From bcaf020bf653698f30afeb7fede3696a24d64c18 Mon Sep 17 00:00:00 2001 From: Mpdreamz Date: Thu, 3 Jan 2019 11:25:48 +0100 Subject: [PATCH 1/8] Initial code gen for CCR --- src/CodeGeneration/ApiGenerator/Program.cs | 2 +- .../RequestParameters.Generated.cs | 45 ++++ .../ElasticLowLevelClient.Generated.cs | 102 +++++++++ .../IElasticLowLevelClient.Generated.cs | 82 ++++++++ .../RemoteClusterConfiguration.cs | 44 ++++ src/Nest/Nest.csproj | 3 + src/Nest/_Generated/_Descriptors.generated.cs | 156 ++++++++++++++ .../_Generated/_LowLevelDispatch.generated.cs | 196 ++++++++++++++++++ src/Nest/_Generated/_Requests.generated.cs | 159 ++++++++++++++ .../NodeSeeders/DefaultSeeder.cs | 22 +- .../Cluster/RemoteInfo/RemoteInfoApiTests.cs | 36 ++-- 11 files changed, 828 insertions(+), 19 deletions(-) create mode 100644 src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs diff --git a/src/CodeGeneration/ApiGenerator/Program.cs b/src/CodeGeneration/ApiGenerator/Program.cs index 25e65806591..9549c83c711 100644 --- a/src/CodeGeneration/ApiGenerator/Program.cs +++ b/src/CodeGeneration/ApiGenerator/Program.cs @@ -40,7 +40,7 @@ private static void Main(string[] args) RestSpecDownloader.Download(downloadBranch); ApiGenerator.Generate(downloadBranch, "Core", "Graph", "License", "Security", "Watcher", "Info", "MachineLearning", "Migration", "Sql", - "Rollup", "Ssl"); + "Rollup", "Ccr", "Ssl"); } } } diff --git a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs index fab698bd43a..5fd773d1771 100644 --- a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs +++ b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs @@ -2187,6 +2187,51 @@ public partial class UpdateByQueryRequestParameters : RequestParametersThe number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. public long? Slices { get => Q("slices"); set => Q("slices", value); } } + ///Request options for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
+ public partial class CcrDeleteAutoFollowPatternRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + } + ///Request options for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
+ public partial class CcrFollowRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + } + ///Request options for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
+ public partial class CcrFollowStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + } + ///Request options for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
+ public partial class CcrGetAutoFollowPatternRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + } + ///Request options for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
+ public partial class CcrPauseFollowRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + } + ///Request options for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
+ public partial class CcrPutAutoFollowPatternRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + } + ///Request options for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
+ public partial class CcrResumeFollowRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + } + ///Request options for CcrStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
+ public partial class CcrStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + } + ///Request options for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
+ public partial class CcrUnfollowRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + } ///Request options for XpackGraphExplore
https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
public partial class GraphExploreRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs index 78bb52fc131..a60d7dedb29 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs @@ -2930,6 +2930,108 @@ public TResponse UpdateByQuery(string index, string type, PostData bo ///A func that allows you to describe the querystring parameters & request specific connection settings. public Task UpdateByQueryAsync(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_update_by_query"), ctx, body, _params(requestParameters)); + ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrDeleteAutoFollowPattern(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters)); + ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrDeleteAutoFollowPatternAsync(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters)); + ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///The name of the follower index + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrFollow(string index, PostData body, CcrFollowRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), body, _params(requestParameters)); + ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///The name of the follower index + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrFollowAsync(string index, PostData body, CcrFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), ctx, body, _params(requestParameters)); + ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrFollowStats(string index, CcrFollowStatsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"{index.NotNull("index")}/_ccr/stats"), null, _params(requestParameters)); + ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrFollowStatsAsync(string index, CcrFollowStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"{index.NotNull("index")}/_ccr/stats"), ctx, null, _params(requestParameters)); + ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrGetAutoFollowPattern(CcrGetAutoFollowPatternRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"_ccr/auto_follow"), null, _params(requestParameters)); + ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrGetAutoFollowPatternAsync(CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_ccr/auto_follow"), ctx, null, _params(requestParameters)); + ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrGetAutoFollowPattern(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters)); + ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrGetAutoFollowPatternAsync(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters)); + ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///The name of the follower index that should pause following its leader index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrPauseFollow(string index, CcrPauseFollowRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), null, _params(requestParameters)); + ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///The name of the follower index that should pause following its leader index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrPauseFollowAsync(string index, CcrPauseFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), ctx, null, _params(requestParameters)); + ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///The specification of the auto follow pattern + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrPutAutoFollowPattern(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), body, _params(requestParameters)); + ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///The specification of the auto follow pattern + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrPutAutoFollowPatternAsync(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, body, _params(requestParameters)); + ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///The name of the follow index to resume following. + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrResumeFollow(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), body, _params(requestParameters)); + ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///The name of the follow index to resume following. + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrResumeFollowAsync(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), ctx, body, _params(requestParameters)); + ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrStats(CcrStatsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"_ccr/stats"), null, _params(requestParameters)); + ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrStatsAsync(CcrStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_ccr/stats"), ctx, null, _params(requestParameters)); + ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current + ///The name of the follower index that should be turned into a regular index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse CcrUnfollow(string index, CcrUnfollowRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), null, _params(requestParameters)); + ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current + ///The name of the follower index that should be turned into a regular index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task CcrUnfollowAsync(string index, CcrUnfollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), ctx, null, _params(requestParameters)); ///GET on /{index}/_xpack/graph/_explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index 9c3ab3f798a..5c09cc97442 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -2376,6 +2376,88 @@ public partial interface IElasticLowLevelClient ///The search definition using the Query DSL ///A func that allows you to describe the querystring parameters & request specific connection settings. Task UpdateByQueryAsync(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrDeleteAutoFollowPattern(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrDeleteAutoFollowPatternAsync(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///The name of the follower index + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrFollow(string index, PostData body, CcrFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///The name of the follower index + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrFollowAsync(string index, PostData body, CcrFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrFollowStats(string index, CcrFollowStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrFollowStatsAsync(string index, CcrFollowStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrGetAutoFollowPattern(CcrGetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrGetAutoFollowPatternAsync(CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrGetAutoFollowPattern(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrGetAutoFollowPatternAsync(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///The name of the follower index that should pause following its leader index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrPauseFollow(string index, CcrPauseFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///The name of the follower index that should pause following its leader index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrPauseFollowAsync(string index, CcrPauseFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///The specification of the auto follow pattern + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrPutAutoFollowPattern(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///The name of the auto follow pattern. + ///The specification of the auto follow pattern + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrPutAutoFollowPatternAsync(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///The name of the follow index to resume following. + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrResumeFollow(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///The name of the follow index to resume following. + ///The name of the leader index and other optional ccr related parameters + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrResumeFollowAsync(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrStats(CcrStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrStatsAsync(CcrStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current + ///The name of the follower index that should be turned into a regular index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse CcrUnfollow(string index, CcrUnfollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current + ///The name of the follower index that should be turned into a regular index. + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task CcrUnfollowAsync(string index, CcrUnfollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /{index}/_xpack/graph/_explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. diff --git a/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs b/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs new file mode 100644 index 00000000000..9e10f1243eb --- /dev/null +++ b/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Nest +{ + /// + /// This is a custom dictionary that helps in the creation of remote cluster configuration + /// you can pass to the Put Cluster Settings API + /// + public class RemoteClusterConfiguration : IsADictionaryBase + { + private readonly Dictionary _remoteDictionary = + new Dictionary(); + + public RemoteClusterConfiguration() => + BackingDictionary["cluster"] = new Dictionary() + { + { "remote", _remoteDictionary } + }; + + public void Add(string name, params Uri[] seeds) => + Add(name, seeds.Select(u => $"{u.Host}:{u.Port}").ToArray()); + + public void Add(string name, params string[] seeds) => + _remoteDictionary[name] = new Dictionary() + { + { "seeds", seeds } + }; + + public static Dictionary operator +(RemoteClusterConfiguration left, IDictionary right) => Combine(left, right); + public static Dictionary operator +(IDictionary left, RemoteClusterConfiguration right) => Combine(left, right); + + private static Dictionary Combine(IDictionary left, IDictionary right) + { + if (left == null && right == null) return null; + if (left == null) return new Dictionary(right); + if (right == null) return new Dictionary(left); + + foreach (var kv in right) left[kv.Key] = kv.Value; + return left; + } + } +} diff --git a/src/Nest/Nest.csproj b/src/Nest/Nest.csproj index 19cf9bbd345..41a14efa53b 100644 --- a/src/Nest/Nest.csproj +++ b/src/Nest/Nest.csproj @@ -12,4 +12,7 @@ + + + \ No newline at end of file diff --git a/src/Nest/_Generated/_Descriptors.generated.cs b/src/Nest/_Generated/_Descriptors.generated.cs index 8df5196319c..5c64998b64f 100644 --- a/src/Nest/_Generated/_Descriptors.generated.cs +++ b/src/Nest/_Generated/_Descriptors.generated.cs @@ -3831,6 +3831,162 @@ public UpdateByQueryDescriptor(Indices index) : base(r=>r.Required("index", inde ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. public UpdateByQueryDescriptor Slices(long? slices) => Qs("slices", slices); } + ///descriptor for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
+ public partial class CcrDeleteAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrDeleteAutoFollowPatternRequest + { + /// /_ccr/auto_follow/{name} + /// this parameter is required + public CcrDeleteAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} + // values part of the url path + Name ICcrDeleteAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
+ public partial class CcrFollowDescriptor : RequestDescriptorBase, ICcrFollowRequest + { + /// /{index}/_ccr/follow + /// this parameter is required + public CcrFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrFollowRequest.Index => Self.RouteValues.Get("index"); + + ///The name of the follower index + public CcrFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + + ///a shortcut into calling Index(typeof(TOther)) + public CcrFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
+ public partial class CcrFollowStatsDescriptor : RequestDescriptorBase, ICcrFollowStatsRequest + { + /// /{index}/_ccr/stats + public CcrFollowStatsDescriptor() : base(){} + // values part of the url path + Indices ICcrFollowStatsRequest.Index => Self.RouteValues.Get("index"); + + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + public CcrFollowStatsDescriptor Index(Indices index) => Assign(a=>a.RouteValues.Optional("index", index)); + + ///a shortcut into calling Index(typeof(TOther)) + public CcrFollowStatsDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Optional("index", (Indices)typeof(TOther))); + + ///A shortcut into calling Index(Indices.All) + public CcrFollowStatsDescriptor AllIndices() => this.Index(Indices.All); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
+ public partial class CcrGetAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrGetAutoFollowPatternRequest + { + /// /_ccr/auto_follow + public CcrGetAutoFollowPatternDescriptor() : base(){} + // values part of the url path + Name ICcrGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + ///The name of the auto follow pattern. + public CcrGetAutoFollowPatternDescriptor Name(Name name) => Assign(a=>a.RouteValues.Optional("name", name)); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
+ public partial class CcrPauseFollowDescriptor : RequestDescriptorBase, ICcrPauseFollowRequest + { + /// /{index}/_ccr/pause_follow + /// this parameter is required + public CcrPauseFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrPauseFollowRequest.Index => Self.RouteValues.Get("index"); + + ///The name of the follower index that should pause following its leader index. + public CcrPauseFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + + ///a shortcut into calling Index(typeof(TOther)) + public CcrPauseFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
+ public partial class CcrPutAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrPutAutoFollowPatternRequest + { + /// /_ccr/auto_follow/{name} + /// this parameter is required + public CcrPutAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} + // values part of the url path + Name ICcrPutAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
+ public partial class CcrResumeFollowDescriptor : RequestDescriptorBase, ICcrResumeFollowRequest + { + /// /{index}/_ccr/resume_follow + /// this parameter is required + public CcrResumeFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrResumeFollowRequest.Index => Self.RouteValues.Get("index"); + + ///The name of the follow index to resume following. + public CcrResumeFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + + ///a shortcut into calling Index(typeof(TOther)) + public CcrResumeFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
+ public partial class CcrStatsDescriptor : RequestDescriptorBase, ICcrStatsRequest + { + // values part of the url path + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } + ///descriptor for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
+ public partial class CcrUnfollowDescriptor : RequestDescriptorBase, ICcrUnfollowRequest + { + /// /{index}/_ccr/unfollow + /// this parameter is required + public CcrUnfollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrUnfollowRequest.Index => Self.RouteValues.Get("index"); + + ///The name of the follower index that should be turned into a regular index. + public CcrUnfollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + + ///a shortcut into calling Index(typeof(TOther)) + public CcrUnfollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + + // Request parameters + + //TODO THIS METHOD IS UNMAPPED! + + } ///descriptor for XpackGraphExplore
https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
public partial class GraphExploreDescriptor : RequestDescriptorBase,GraphExploreRequestParameters, IGraphExploreRequest>, IGraphExploreRequest { diff --git a/src/Nest/_Generated/_LowLevelDispatch.generated.cs b/src/Nest/_Generated/_LowLevelDispatch.generated.cs index 9d708722c0d..53d9334569a 100644 --- a/src/Nest/_Generated/_LowLevelDispatch.generated.cs +++ b/src/Nest/_Generated/_LowLevelDispatch.generated.cs @@ -2924,6 +2924,202 @@ internal partial class LowLevelDispatch throw InvalidDispatch("UpdateByQuery", p, new [] { POST }, "/{index}/_update_by_query", "/{index}/{type}/_update_by_query"); } + internal TResponse CcrDeleteAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.Name)) return _lowLevel.CcrDeleteAutoFollowPattern(p.RouteValues.Name,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrDeleteAutoFollowPattern", p, new [] { DELETE }, "/_ccr/auto_follow/{name}"); + } + + internal Task CcrDeleteAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.Name)) return _lowLevel.CcrDeleteAutoFollowPatternAsync(p.RouteValues.Name,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrDeleteAutoFollowPattern", p, new [] { DELETE }, "/_ccr/auto_follow/{name}"); + } + + internal TResponse CcrFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrFollow(p.RouteValues.Index,body,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrFollow", p, new [] { PUT }, "/{index}/_ccr/follow"); + } + + internal Task CcrFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrFollowAsync(p.RouteValues.Index,body,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrFollow", p, new [] { PUT }, "/{index}/_ccr/follow"); + } + + internal TResponse CcrFollowStatsDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + if (AllSet(p.RouteValues.Index)) return _lowLevel.CcrFollowStats(p.RouteValues.Index,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrFollowStats", p, new [] { GET }, "/{index}/_ccr/stats"); + } + + internal Task CcrFollowStatsDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + if (AllSet(p.RouteValues.Index)) return _lowLevel.CcrFollowStatsAsync(p.RouteValues.Index,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrFollowStats", p, new [] { GET }, "/{index}/_ccr/stats"); + } + + internal TResponse CcrGetAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + if (AllSet(p.RouteValues.Name)) return _lowLevel.CcrGetAutoFollowPattern(p.RouteValues.Name,p.RequestParameters); + return _lowLevel.CcrGetAutoFollowPattern(p.RequestParameters); + } + throw InvalidDispatch("CcrGetAutoFollowPattern", p, new [] { GET }, "/_ccr/auto_follow", "/_ccr/auto_follow/{name}"); + } + + internal Task CcrGetAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + if (AllSet(p.RouteValues.Name)) return _lowLevel.CcrGetAutoFollowPatternAsync(p.RouteValues.Name,p.RequestParameters,ct); + return _lowLevel.CcrGetAutoFollowPatternAsync(p.RequestParameters,ct); + } + throw InvalidDispatch("CcrGetAutoFollowPattern", p, new [] { GET }, "/_ccr/auto_follow", "/_ccr/auto_follow/{name}"); + } + + internal TResponse CcrPauseFollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrPauseFollow(p.RouteValues.Index,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrPauseFollow", p, new [] { POST }, "/{index}/_ccr/pause_follow"); + } + + internal Task CcrPauseFollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrPauseFollowAsync(p.RouteValues.Index,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrPauseFollow", p, new [] { POST }, "/{index}/_ccr/pause_follow"); + } + + internal TResponse CcrPutAutoFollowPatternDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.Name)) return _lowLevel.CcrPutAutoFollowPattern(p.RouteValues.Name,body,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrPutAutoFollowPattern", p, new [] { PUT }, "/_ccr/auto_follow/{name}"); + } + + internal Task CcrPutAutoFollowPatternDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.Name)) return _lowLevel.CcrPutAutoFollowPatternAsync(p.RouteValues.Name,body,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrPutAutoFollowPattern", p, new [] { PUT }, "/_ccr/auto_follow/{name}"); + } + + internal TResponse CcrResumeFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrResumeFollow(p.RouteValues.Index,body,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrResumeFollow", p, new [] { POST }, "/{index}/_ccr/resume_follow"); + } + + internal Task CcrResumeFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrResumeFollowAsync(p.RouteValues.Index,body,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrResumeFollow", p, new [] { POST }, "/{index}/_ccr/resume_follow"); + } + + internal TResponse CcrStatsDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + return _lowLevel.CcrStats(p.RequestParameters); + } + throw InvalidDispatch("CcrStats", p, new [] { GET }, "/_ccr/stats"); + } + + internal Task CcrStatsDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case GET: + return _lowLevel.CcrStatsAsync(p.RequestParameters,ct); + } + throw InvalidDispatch("CcrStats", p, new [] { GET }, "/_ccr/stats"); + } + + internal TResponse CcrUnfollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrUnfollow(p.RouteValues.Index,p.RequestParameters); + break; + } + throw InvalidDispatch("CcrUnfollow", p, new [] { POST }, "/{index}/_ccr/unfollow"); + } + + internal Task CcrUnfollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case POST: + if (AllSetNoFallback(p.RouteValues.Index)) return _lowLevel.CcrUnfollowAsync(p.RouteValues.Index,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("CcrUnfollow", p, new [] { POST }, "/{index}/_ccr/unfollow"); + } + internal TResponse XpackGraphExploreDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) diff --git a/src/Nest/_Generated/_Requests.generated.cs b/src/Nest/_Generated/_Requests.generated.cs index 3cbeef9c641..2a4ad7c7fa0 100644 --- a/src/Nest/_Generated/_Requests.generated.cs +++ b/src/Nest/_Generated/_Requests.generated.cs @@ -862,6 +862,165 @@ public CatThreadPoolRequest(Names thread_pool_patterns) : base(r=>r.Optional("th public bool? Verbose { get => Q("v"); set => Q("v", value); } } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrDeleteAutoFollowPatternRequest : IRequest + { + Name Name { get; } + } + ///Request parameters for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
+ public partial class CcrDeleteAutoFollowPatternRequest : PlainRequestBase, ICcrDeleteAutoFollowPatternRequest + { + protected ICcrDeleteAutoFollowPatternRequest Self => this; + ////_ccr/auto_follow/{name} + ///this parameter is required + public CcrDeleteAutoFollowPatternRequest(Name name) : base(r=>r.Required("name", name)){} + // values part of the url path + Name ICcrDeleteAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrFollowRequest : IRequest + { + IndexName Index { get; } + } + ///Request parameters for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
+ public partial class CcrFollowRequest : PlainRequestBase, ICcrFollowRequest + { + protected ICcrFollowRequest Self => this; + ////{index}/_ccr/follow + ///this parameter is required + public CcrFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrFollowRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrFollowStatsRequest : IRequest + { + Indices Index { get; } + } + ///Request parameters for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
+ public partial class CcrFollowStatsRequest : PlainRequestBase, ICcrFollowStatsRequest + { + protected ICcrFollowStatsRequest Self => this; + ////{index}/_ccr/stats + ///Optional, accepts null + public CcrFollowStatsRequest(Indices index) : base(r=>r.Optional("index", index)){} + // values part of the url path + Indices ICcrFollowStatsRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrGetAutoFollowPatternRequest : IRequest + { + Name Name { get; } + } + ///Request parameters for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
+ public partial class CcrGetAutoFollowPatternRequest : PlainRequestBase, ICcrGetAutoFollowPatternRequest + { + protected ICcrGetAutoFollowPatternRequest Self => this; + ////_ccr/auto_follow + public CcrGetAutoFollowPatternRequest() : base(){} + ////_ccr/auto_follow/{name} + ///Optional, accepts null + public CcrGetAutoFollowPatternRequest(Name name) : base(r=>r.Optional("name", name)){} + // values part of the url path + Name ICcrGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrPauseFollowRequest : IRequest + { + IndexName Index { get; } + } + ///Request parameters for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
+ public partial class CcrPauseFollowRequest : PlainRequestBase, ICcrPauseFollowRequest + { + protected ICcrPauseFollowRequest Self => this; + ////{index}/_ccr/pause_follow + ///this parameter is required + public CcrPauseFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrPauseFollowRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrPutAutoFollowPatternRequest : IRequest + { + Name Name { get; } + } + ///Request parameters for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
+ public partial class CcrPutAutoFollowPatternRequest : PlainRequestBase, ICcrPutAutoFollowPatternRequest + { + protected ICcrPutAutoFollowPatternRequest Self => this; + ////_ccr/auto_follow/{name} + ///this parameter is required + public CcrPutAutoFollowPatternRequest(Name name) : base(r=>r.Required("name", name)){} + // values part of the url path + Name ICcrPutAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrResumeFollowRequest : IRequest + { + IndexName Index { get; } + } + ///Request parameters for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
+ public partial class CcrResumeFollowRequest : PlainRequestBase, ICcrResumeFollowRequest + { + protected ICcrResumeFollowRequest Self => this; + ////{index}/_ccr/resume_follow + ///this parameter is required + public CcrResumeFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrResumeFollowRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrStatsRequest : IRequest + { + } + ///Request parameters for CcrStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
+ public partial class CcrStatsRequest : PlainRequestBase, ICcrStatsRequest + { + protected ICcrStatsRequest Self => this; + // values part of the url path + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICcrUnfollowRequest : IRequest + { + IndexName Index { get; } + } + ///Request parameters for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
+ public partial class CcrUnfollowRequest : PlainRequestBase, ICcrUnfollowRequest + { + protected ICcrUnfollowRequest Self => this; + ////{index}/_ccr/unfollow + ///this parameter is required + public CcrUnfollowRequest(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICcrUnfollowRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + //TODO THIS METHOD IS UNMAPPED! + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface IChangePasswordRequest : IRequest { Name Username { get; } diff --git a/src/Tests/Tests.Core/ManagedElasticsearch/NodeSeeders/DefaultSeeder.cs b/src/Tests/Tests.Core/ManagedElasticsearch/NodeSeeders/DefaultSeeder.cs index 1f88aea4631..e784ff671cf 100644 --- a/src/Tests/Tests.Core/ManagedElasticsearch/NodeSeeders/DefaultSeeder.cs +++ b/src/Tests/Tests.Core/ManagedElasticsearch/NodeSeeders/DefaultSeeder.cs @@ -17,6 +17,8 @@ public class DefaultSeeder public const string ProjectsAliasName = "projects-alias"; public const string TestsIndexTemplateName = "nest_tests"; + public const string RemoteClusterName = "remote-cluster"; + public const string PipelineName = "nest-pipeline"; private readonly IIndexSettings _defaultIndexSettings = new IndexSettings() @@ -83,11 +85,21 @@ public async Task ClusterSettingsAsync() { if (TestConfiguration.Instance.InRange("<6.1.0")) return; - var putSettingsResponse = await Client.ClusterPutSettingsAsync(s => s - .Transient(t => t - .Add("cluster.routing.use_adaptive_replica_selection", true) - ) - ); + var clusterConfiguration = new Dictionary() + { + { "cluster.routing.use_adaptive_replica_selection", true } + }; + + if (TestConfiguration.Instance.InRange(">=6.5.0")) + clusterConfiguration += new RemoteClusterConfiguration() + { + { RemoteClusterName, "127.0.0.1:9300" } + }; + + var putSettingsResponse = Client.ClusterPutSettings(new ClusterPutSettingsRequest + { + Transient = clusterConfiguration + }); putSettingsResponse.ShouldBeValid(); } diff --git a/src/Tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs b/src/Tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs index b3cbb8a8aec..c4274428b05 100644 --- a/src/Tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs +++ b/src/Tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs @@ -23,33 +23,43 @@ public RemoteInfoApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(c protected override void IntegrationSetup(IElasticClient client, CallUniqueValues values) { - var enableRemoteClusters = client.ClusterPutSettings(new ClusterPutSettingsRequest + var oldWay = new M { - Transient = new M { + "search", new M { - "search", new M { + "remote", new M { - "remote", new M { + "cluster_one", new M { - "cluster_one", new M - { - { "seeds", new[] { "127.0.0.1:9300", "127.0.0.1:9301" } } - } - }, + { "seeds", new[] { "127.0.0.1:9300", "127.0.0.1:9301" } } + } + }, + { + "cluster_two", new M { - "cluster_two", new M - { - { "seeds", new[] { "127.0.0.1:9300" } } - } + { "seeds", new[] { "127.0.0.1:9300" } } } } } } } } + }; + /** + * As of 6.5.0 you can also use the following helper class which uses + * the new way to configure remote clusters. + */ + var newWay = new RemoteClusterConfiguration() + { + { "cluster_one", "127.0.0.1:9300", "127.0.0.1:9301" }, + { "cluster_two", "127.0.0.1:9300" } + }; + var enableRemoteClusters = client.ClusterPutSettings(new ClusterPutSettingsRequest + { + Transient = oldWay }); enableRemoteClusters.ShouldBeValid(); From 5c26b7b4c64fb32077ca65369c5478a40f07ebb9 Mon Sep 17 00:00:00 2001 From: Mpdreamz Date: Thu, 3 Jan 2019 13:35:58 +0100 Subject: [PATCH 2/8] Created all the infra for the CCR api's (request/response/client methods) --- .../RequestParameters.Generated.cs | 16 +- .../ElasticLowLevelClient.Generated.cs | 36 +-- .../IElasticLowLevelClient.Generated.cs | 36 +-- .../RemoteClusterConfiguration.cs | 2 +- src/Nest/Nest.csproj | 3 - .../CreateAutoFollowPatternRequest.cs | 32 ++ .../CreateAutoFollowResponse.cs | 20 ++ .../ElasticClient-CreateAutoFollowPattern.cs | 52 ++++ .../DeleteAutoFollowPatternRequest.cs | 32 ++ .../DeleteAutoFollowPatternResponse.cs | 20 ++ .../ElasticClient-DeleteAutoFollowPattern.cs | 52 ++++ .../ElasticClient-GetAutoFollowPattern.cs | 55 ++++ .../GetAutoFollowPatternRequest.cs | 32 ++ .../GetAutoFollowPatternResponse.cs | 20 ++ .../CreateFollowIndexRequest.cs | 32 ++ .../CreateFollowIndexResponse.cs | 20 ++ .../ElasticClient-CreateFollowIndex.cs | 52 ++++ .../ElasticClient-FollowIndexStats.cs | 52 ++++ .../FollowIndexStatsRequest.cs | 32 ++ .../FollowIndexStatsResponse.cs | 20 ++ .../ElasticClient-PauseFollowIndex.cs | 54 ++++ .../PauseFollowIndexRequest.cs | 32 ++ .../PauseFollowIndexResponse.cs | 20 ++ .../ElasticClient-ResumeFollowIndex.cs | 52 ++++ .../ResumeFollowIndexRequest.cs | 32 ++ .../ResumeFollowIndexResponse.cs | 20 ++ .../ElasticClient-UnfollowIndex.cs | 52 ++++ .../UnfollowIndex/UnfollowIndexRequest.cs | 32 ++ .../UnfollowIndex/UnfollowIndexResponse.cs | 20 ++ .../Stats/CcrStatsRequest.cs | 32 ++ .../Stats/CcrStatsResponse.cs | 20 ++ .../Stats/ElasticClient-CcrStats.cs | 52 ++++ src/Nest/_Generated/_Descriptors.generated.cs | 90 +++--- .../_Generated/_LowLevelDispatch.generated.cs | 32 +- src/Nest/_Generated/_Requests.generated.cs | 285 +++++++++--------- 35 files changed, 1176 insertions(+), 265 deletions(-) create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowPatternRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/ElasticClient-CreateAutoFollowPattern.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/ElasticClient-DeleteAutoFollowPattern.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/ElasticClient-GetAutoFollowPattern.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/ElasticClient-CreateFollowIndex.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/ElasticClient-FollowIndexStats.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/ElasticClient-PauseFollowIndex.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ElasticClient-ResumeFollowIndex.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/ElasticClient-UnfollowIndex.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsRequest.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs create mode 100644 src/Nest/XPack/CrossClusterReplication/Stats/ElasticClient-CcrStats.cs diff --git a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs index 5fd773d1771..e032c8e5e69 100644 --- a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs +++ b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs @@ -2188,37 +2188,37 @@ public partial class UpdateByQueryRequestParameters : RequestParameters Q("slices"); set => Q("slices", value); } } ///Request options for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
- public partial class CcrDeleteAutoFollowPatternRequestParameters : RequestParameters + public partial class DeleteAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; } ///Request options for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
- public partial class CcrFollowRequestParameters : RequestParameters + public partial class CreateFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; } ///Request options for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
- public partial class CcrFollowStatsRequestParameters : RequestParameters + public partial class FollowIndexStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; } ///Request options for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
- public partial class CcrGetAutoFollowPatternRequestParameters : RequestParameters + public partial class GetAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; } ///Request options for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
- public partial class CcrPauseFollowRequestParameters : RequestParameters + public partial class PauseFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; } ///Request options for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
- public partial class CcrPutAutoFollowPatternRequestParameters : RequestParameters + public partial class CreateAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; } ///Request options for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
- public partial class CcrResumeFollowRequestParameters : RequestParameters + public partial class ResumeFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; } @@ -2228,7 +2228,7 @@ public partial class CcrStatsRequestParameters : RequestParameters HttpMethod.GET; } ///Request options for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
- public partial class CcrUnfollowRequestParameters : RequestParameters + public partial class UnfollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs index a60d7dedb29..39279aeed86 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs @@ -2933,86 +2933,86 @@ public TResponse UpdateByQuery(string index, string type, PostData bo ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrDeleteAutoFollowPattern(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null) + public TResponse CcrDeleteAutoFollowPattern(string name, DeleteAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters)); ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrDeleteAutoFollowPatternAsync(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrDeleteAutoFollowPatternAsync(string name, DeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters)); ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html ///The name of the follower index ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrFollow(string index, PostData body, CcrFollowRequestParameters requestParameters = null) + public TResponse CcrFollow(string index, PostData body, CreateFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), body, _params(requestParameters)); ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html ///The name of the follower index ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrFollowAsync(string index, PostData body, CcrFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrFollowAsync(string index, PostData body, CreateFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), ctx, body, _params(requestParameters)); ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrFollowStats(string index, CcrFollowStatsRequestParameters requestParameters = null) + public TResponse CcrFollowStats(string index, FollowIndexStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"{index.NotNull("index")}/_ccr/stats"), null, _params(requestParameters)); ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrFollowStatsAsync(string index, CcrFollowStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrFollowStatsAsync(string index, FollowIndexStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"{index.NotNull("index")}/_ccr/stats"), ctx, null, _params(requestParameters)); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrGetAutoFollowPattern(CcrGetAutoFollowPatternRequestParameters requestParameters = null) + public TResponse CcrGetAutoFollowPattern(GetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"_ccr/auto_follow"), null, _params(requestParameters)); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrGetAutoFollowPatternAsync(CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrGetAutoFollowPatternAsync(GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_ccr/auto_follow"), ctx, null, _params(requestParameters)); ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrGetAutoFollowPattern(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null) + public TResponse CcrGetAutoFollowPattern(string name, GetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters)); ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrGetAutoFollowPatternAsync(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrGetAutoFollowPatternAsync(string name, GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters)); ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html ///The name of the follower index that should pause following its leader index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrPauseFollow(string index, CcrPauseFollowRequestParameters requestParameters = null) + public TResponse CcrPauseFollow(string index, PauseFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), null, _params(requestParameters)); ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html ///The name of the follower index that should pause following its leader index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrPauseFollowAsync(string index, CcrPauseFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrPauseFollowAsync(string index, PauseFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), ctx, null, _params(requestParameters)); ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html ///The name of the auto follow pattern. ///The specification of the auto follow pattern ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrPutAutoFollowPattern(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null) + public TResponse CcrPutAutoFollowPattern(string name, PostData body, CreateAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), body, _params(requestParameters)); ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html ///The name of the auto follow pattern. ///The specification of the auto follow pattern ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrPutAutoFollowPatternAsync(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrPutAutoFollowPatternAsync(string name, PostData body, CreateAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, body, _params(requestParameters)); ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html ///The name of the follow index to resume following. ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrResumeFollow(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null) + public TResponse CcrResumeFollow(string index, PostData body, ResumeFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), body, _params(requestParameters)); ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html ///The name of the follow index to resume following. ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrResumeFollowAsync(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrResumeFollowAsync(string index, PostData body, ResumeFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), ctx, body, _params(requestParameters)); ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html ///A func that allows you to describe the querystring parameters & request specific connection settings. @@ -3025,12 +3025,12 @@ public TResponse CcrStats(CcrStatsRequestParameters requestParameters ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current ///The name of the follower index that should be turned into a regular index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public TResponse CcrUnfollow(string index, CcrUnfollowRequestParameters requestParameters = null) + public TResponse CcrUnfollow(string index, UnfollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), null, _params(requestParameters)); ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current ///The name of the follower index that should be turned into a regular index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - public Task CcrUnfollowAsync(string index, CcrUnfollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + public Task CcrUnfollowAsync(string index, UnfollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), ctx, null, _params(requestParameters)); ///GET on /{index}/_xpack/graph/_explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index 5c09cc97442..53e7391e819 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -2379,71 +2379,71 @@ public partial interface IElasticLowLevelClient ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrDeleteAutoFollowPattern(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrDeleteAutoFollowPattern(string name, DeleteAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrDeleteAutoFollowPatternAsync(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrDeleteAutoFollowPatternAsync(string name, DeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html ///The name of the follower index ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrFollow(string index, PostData body, CcrFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrFollow(string index, PostData body, CreateFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html ///The name of the follower index ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrFollowAsync(string index, PostData body, CcrFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrFollowAsync(string index, PostData body, CreateFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrFollowStats(string index, CcrFollowStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrFollowStats(string index, FollowIndexStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrFollowStatsAsync(string index, CcrFollowStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrFollowStatsAsync(string index, FollowIndexStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrGetAutoFollowPattern(CcrGetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrGetAutoFollowPattern(GetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrGetAutoFollowPatternAsync(CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrGetAutoFollowPatternAsync(GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrGetAutoFollowPattern(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrGetAutoFollowPattern(string name, GetAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///The name of the auto follow pattern. ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrGetAutoFollowPatternAsync(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrGetAutoFollowPatternAsync(string name, GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html ///The name of the follower index that should pause following its leader index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrPauseFollow(string index, CcrPauseFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrPauseFollow(string index, PauseFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html ///The name of the follower index that should pause following its leader index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrPauseFollowAsync(string index, CcrPauseFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrPauseFollowAsync(string index, PauseFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html ///The name of the auto follow pattern. ///The specification of the auto follow pattern ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrPutAutoFollowPattern(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrPutAutoFollowPattern(string name, PostData body, CreateAutoFollowPatternRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html ///The name of the auto follow pattern. ///The specification of the auto follow pattern ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrPutAutoFollowPatternAsync(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrPutAutoFollowPatternAsync(string name, PostData body, CreateAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html ///The name of the follow index to resume following. ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrResumeFollow(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrResumeFollow(string index, PostData body, ResumeFollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html ///The name of the follow index to resume following. ///The name of the leader index and other optional ccr related parameters ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrResumeFollowAsync(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrResumeFollowAsync(string index, PostData body, ResumeFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html ///A func that allows you to describe the querystring parameters & request specific connection settings. TResponse CcrStats(CcrStatsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); @@ -2453,11 +2453,11 @@ public partial interface IElasticLowLevelClient ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current ///The name of the follower index that should be turned into a regular index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - TResponse CcrUnfollow(string index, CcrUnfollowRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + TResponse CcrUnfollow(string index, UnfollowIndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current ///The name of the follower index that should be turned into a regular index. ///A func that allows you to describe the querystring parameters & request specific connection settings. - Task CcrUnfollowAsync(string index, CcrUnfollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + Task CcrUnfollowAsync(string index, UnfollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///GET on /{index}/_xpack/graph/_explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A func that allows you to describe the querystring parameters & request specific connection settings. diff --git a/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs b/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs index 9e10f1243eb..a75633f70f9 100644 --- a/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs +++ b/src/Nest/Cluster/ClusterSettings/ClusterPutSettings/RemoteClusterConfiguration.cs @@ -38,7 +38,7 @@ private static Dictionary Combine(IDictionary le if (right == null) return new Dictionary(left); foreach (var kv in right) left[kv.Key] = kv.Value; - return left; + return new Dictionary(left); } } } diff --git a/src/Nest/Nest.csproj b/src/Nest/Nest.csproj index 41a14efa53b..19cf9bbd345 100644 --- a/src/Nest/Nest.csproj +++ b/src/Nest/Nest.csproj @@ -12,7 +12,4 @@ - - - \ No newline at end of file diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowPatternRequest.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowPatternRequest.cs new file mode 100644 index 00000000000..56ee3e9f0e2 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowPatternRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.put_auto_follow_pattern.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface ICreateAutoFollowPatternRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class CreateAutoFollowPatternRequest + { + /// + public string Cursor { get; set; } + } + + public partial class CreateAutoFollowPatternDescriptor + { + string ICreateAutoFollowPatternRequest.Cursor { get; set; } + + /// + public CreateAutoFollowPatternDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowResponse.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowResponse.cs new file mode 100644 index 00000000000..34d9d7bfa66 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface ICreateAutoFollowPatternResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class CreateAutoFollowPatternResponse : ResponseBase, ICreateAutoFollowPatternResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/ElasticClient-CreateAutoFollowPattern.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/ElasticClient-CreateAutoFollowPattern.cs new file mode 100644 index 00000000000..7fa1af529ce --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/ElasticClient-CreateAutoFollowPattern.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + ICreateAutoFollowPatternResponse CreateAutoFollowPattern(Name name, Func selector); + + /// + ICreateAutoFollowPatternResponse CreateAutoFollowPattern(ICreateAutoFollowPatternRequest request); + + /// + Task CreateAutoFollowPatternAsync(Name name, Func selector, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task CreateAutoFollowPatternAsync(ICreateAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public ICreateAutoFollowPatternResponse CreateAutoFollowPattern(Name name, Func selector) => + CreateAutoFollowPattern(selector.InvokeOrDefault(new CreateAutoFollowPatternDescriptor(name))); + + /// + public ICreateAutoFollowPatternResponse CreateAutoFollowPattern(ICreateAutoFollowPatternRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrPutAutoFollowPatternDispatch(p, d) + ); + + /// + public Task CreateAutoFollowPatternAsync(Name name, Func selector, + CancellationToken cancellationToken = default(CancellationToken) + ) => + CreateAutoFollowPatternAsync(selector.InvokeOrDefault(new CreateAutoFollowPatternDescriptor(name)), cancellationToken); + + /// + public Task CreateAutoFollowPatternAsync(ICreateAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrPutAutoFollowPatternDispatchAsync(p, d, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternRequest.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternRequest.cs new file mode 100644 index 00000000000..50224d703eb --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.delete_auto_follow_pattern.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IDeleteAutoFollowPatternRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class DeleteAutoFollowPatternRequest + { + /// + public string Cursor { get; set; } + } + + public partial class DeleteAutoFollowPatternDescriptor + { + string IDeleteAutoFollowPatternRequest.Cursor { get; set; } + + /// + public DeleteAutoFollowPatternDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternResponse.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternResponse.cs new file mode 100644 index 00000000000..9311ad5e09c --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/DeleteAutoFollowPatternResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IDeleteAutoFollowPatternResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class DeleteAutoFollowPatternResponse : ResponseBase, IDeleteAutoFollowPatternResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/ElasticClient-DeleteAutoFollowPattern.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/ElasticClient-DeleteAutoFollowPattern.cs new file mode 100644 index 00000000000..3af09a86fea --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/DeleteAutoFollowPattern/ElasticClient-DeleteAutoFollowPattern.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + IDeleteAutoFollowPatternResponse DeleteAutoFollowPattern(Name name, Func selector = null); + + /// + IDeleteAutoFollowPatternResponse DeleteAutoFollowPattern(IDeleteAutoFollowPatternRequest request); + + /// + Task DeleteAutoFollowPatternAsync(Name name, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task DeleteAutoFollowPatternAsync(IDeleteAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IDeleteAutoFollowPatternResponse DeleteAutoFollowPattern(Name name, Func selector = null) => + DeleteAutoFollowPattern(selector.InvokeOrDefault(new DeleteAutoFollowPatternDescriptor(name))); + + /// + public IDeleteAutoFollowPatternResponse DeleteAutoFollowPattern(IDeleteAutoFollowPatternRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrDeleteAutoFollowPatternDispatch(p) + ); + + /// + public Task DeleteAutoFollowPatternAsync(Name name, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + DeleteAutoFollowPatternAsync(selector.InvokeOrDefault(new DeleteAutoFollowPatternDescriptor(name)), cancellationToken); + + /// + public Task DeleteAutoFollowPatternAsync(IDeleteAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrDeleteAutoFollowPatternDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/ElasticClient-GetAutoFollowPattern.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/ElasticClient-GetAutoFollowPattern.cs new file mode 100644 index 00000000000..7f7576d52e0 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/ElasticClient-GetAutoFollowPattern.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + // TODO: should we force names as first argument (i think this is inline with other gets) + // TODO: I THINK we need to patch the json spec for {name} to be a list of names + + /// + IGetAutoFollowPatternResponse GetAutoFollowPattern(Func selector = null); + + /// + IGetAutoFollowPatternResponse GetAutoFollowPattern(IGetAutoFollowPatternRequest request); + + /// + Task GetAutoFollowPatternAsync(Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task GetAutoFollowPatternAsync(IGetAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IGetAutoFollowPatternResponse GetAutoFollowPattern(Func selector = null) => + GetAutoFollowPattern(selector.InvokeOrDefault(new GetAutoFollowPatternDescriptor())); + + /// + public IGetAutoFollowPatternResponse GetAutoFollowPattern(IGetAutoFollowPatternRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrGetAutoFollowPatternDispatch(p) + ); + + /// + public Task GetAutoFollowPatternAsync(Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + GetAutoFollowPatternAsync(selector.InvokeOrDefault(new GetAutoFollowPatternDescriptor()), cancellationToken); + + /// + public Task GetAutoFollowPatternAsync(IGetAutoFollowPatternRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrGetAutoFollowPatternDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternRequest.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternRequest.cs new file mode 100644 index 00000000000..35c972b9bc4 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.get_auto_follow_pattern.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IGetAutoFollowPatternRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class GetAutoFollowPatternRequest + { + /// + public string Cursor { get; set; } + } + + public partial class GetAutoFollowPatternDescriptor + { + string IGetAutoFollowPatternRequest.Cursor { get; set; } + + /// + public GetAutoFollowPatternDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternResponse.cs b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternResponse.cs new file mode 100644 index 00000000000..b9523ee5b8a --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/AutoFollow/GetAutoFollowPattern/GetAutoFollowPatternResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IGetAutoFollowPatternResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class GetAutoFollowPatternResponse : ResponseBase, IGetAutoFollowPatternResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexRequest.cs b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexRequest.cs new file mode 100644 index 00000000000..f0485979a15 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.follow.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface ICreateFollowIndexRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class CreateFollowIndexRequest + { + /// + public string Cursor { get; set; } + } + + public partial class CreateFollowIndexDescriptor + { + string ICreateFollowIndexRequest.Cursor { get; set; } + + /// + public CreateFollowIndexDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexResponse.cs b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexResponse.cs new file mode 100644 index 00000000000..8fa95e15c56 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/CreateFollowIndexResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface ICreateFollowIndexResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class CreateFollowIndexResponse : ResponseBase, ICreateFollowIndexResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/ElasticClient-CreateFollowIndex.cs b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/ElasticClient-CreateFollowIndex.cs new file mode 100644 index 00000000000..2aa6ade4785 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/CreateFollowIndex/ElasticClient-CreateFollowIndex.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + ICreateFollowIndexResponse CreateFollowIndex(IndexName index, Func selector); + + /// + ICreateFollowIndexResponse CreateFollowIndex(ICreateFollowIndexRequest request); + + /// + Task CreateFollowIndexAsync(IndexName index, Func selector, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task CreateFollowIndexAsync(ICreateFollowIndexRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public ICreateFollowIndexResponse CreateFollowIndex(IndexName index, Func selector) => + CreateFollowIndex(selector.InvokeOrDefault(new CreateFollowIndexDescriptor(index))); + + /// + public ICreateFollowIndexResponse CreateFollowIndex(ICreateFollowIndexRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrFollowDispatch(p, d) + ); + + /// + public Task CreateFollowIndexAsync(IndexName index, Func selector, + CancellationToken cancellationToken = default(CancellationToken) + ) => + CreateFollowIndexAsync(selector.InvokeOrDefault(new CreateFollowIndexDescriptor(index)), cancellationToken); + + /// + public Task CreateFollowIndexAsync(ICreateFollowIndexRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrFollowDispatchAsync(p, d, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/ElasticClient-FollowIndexStats.cs b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/ElasticClient-FollowIndexStats.cs new file mode 100644 index 00000000000..15ce16d9eec --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/ElasticClient-FollowIndexStats.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + IFollowIndexStatsResponse FollowIndexStats(Indices indices, Func selector = null); + + /// + IFollowIndexStatsResponse FollowIndexStats(IFollowIndexStatsRequest request); + + /// + Task FollowIndexStatsAsync(Indices indices, Func selector = null, + CancellationToken cancellationToken = default + ); + + /// + Task FollowIndexStatsAsync(IFollowIndexStatsRequest request, CancellationToken cancellationToken = default); + } + + public partial class ElasticClient + { + /// + public IFollowIndexStatsResponse FollowIndexStats(Indices indices, Func selector = null) => + FollowIndexStats(selector.InvokeOrDefault(new FollowIndexStatsDescriptor().Index(indices))); + + /// + public IFollowIndexStatsResponse FollowIndexStats(IFollowIndexStatsRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrFollowStatsDispatch(p) + ); + + /// + public Task FollowIndexStatsAsync(Indices indices, Func selector = null, + CancellationToken cancellationToken = default + ) => + FollowIndexStatsAsync(selector.InvokeOrDefault(new FollowIndexStatsDescriptor().Index(indices)), cancellationToken); + + /// + public Task FollowIndexStatsAsync(IFollowIndexStatsRequest request, CancellationToken cancellationToken = default) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrFollowStatsDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsRequest.cs b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsRequest.cs new file mode 100644 index 00000000000..d883fff0f6e --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.follow_stats.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IFollowIndexStatsRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class FollowIndexStatsRequest + { + /// + public string Cursor { get; set; } + } + + public partial class FollowIndexStatsDescriptor + { + string IFollowIndexStatsRequest.Cursor { get; set; } + + /// + public FollowIndexStatsDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsResponse.cs b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsResponse.cs new file mode 100644 index 00000000000..63d0045e99b --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/FollowIndexStats/FollowIndexStatsResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IFollowIndexStatsResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class FollowIndexStatsResponse : ResponseBase, IFollowIndexStatsResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/ElasticClient-PauseFollowIndex.cs b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/ElasticClient-PauseFollowIndex.cs new file mode 100644 index 00000000000..5ca02d545ea --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/ElasticClient-PauseFollowIndex.cs @@ -0,0 +1,54 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + IPauseFollowIndexResponse PauseFollowIndex(IndexName index, Func selector = null); + + /// + IPauseFollowIndexResponse PauseFollowIndex(IPauseFollowIndexRequest request); + + /// + Task PauseFollowIndexAsync(IndexName index, Func selector = null, + CancellationToken cancellationToken = default + ); + + /// + Task PauseFollowIndexAsync(IPauseFollowIndexRequest request, CancellationToken cancellationToken = default); + } + + public partial class ElasticClient + { + /// + public IPauseFollowIndexResponse PauseFollowIndex(IndexName index, Func selector = null) => + PauseFollowIndex(selector.InvokeOrDefault(new PauseFollowIndexDescriptor(index))); + + /// + public IPauseFollowIndexResponse PauseFollowIndex(IPauseFollowIndexRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrPauseFollowDispatch(p) + ); + + /// + public Task PauseFollowIndexAsync( + IndexName index, + Func selector = null, + CancellationToken cancellationToken = default + ) => + PauseFollowIndexAsync(selector.InvokeOrDefault(new PauseFollowIndexDescriptor(index)), cancellationToken); + + /// + public Task PauseFollowIndexAsync(IPauseFollowIndexRequest request, CancellationToken cancellationToken = default) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrPauseFollowDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexRequest.cs b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexRequest.cs new file mode 100644 index 00000000000..40a6da36dbd --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.pause_follow.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IPauseFollowIndexRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class PauseFollowIndexRequest + { + /// + public string Cursor { get; set; } + } + + public partial class PauseFollowIndexDescriptor + { + string IPauseFollowIndexRequest.Cursor { get; set; } + + /// + public PauseFollowIndexDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexResponse.cs b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexResponse.cs new file mode 100644 index 00000000000..30e9d07ecf3 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/PauseFollowIndex/PauseFollowIndexResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IPauseFollowIndexResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class PauseFollowIndexResponse : ResponseBase, IPauseFollowIndexResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ElasticClient-ResumeFollowIndex.cs b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ElasticClient-ResumeFollowIndex.cs new file mode 100644 index 00000000000..074e3607527 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ElasticClient-ResumeFollowIndex.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + IResumeFollowIndexResponse ResumeFollowIndex(IndexName index, Func selector = null); + + /// + IResumeFollowIndexResponse ResumeFollowIndex(IResumeFollowIndexRequest request); + + /// + Task ResumeFollowIndexAsync(IndexName index, Func selector = null, + CancellationToken cancellationToken = default + ); + + /// + Task ResumeFollowIndexAsync(IResumeFollowIndexRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IResumeFollowIndexResponse ResumeFollowIndex(IndexName index, Func selector = null) => + ResumeFollowIndex(selector.InvokeOrDefault(new ResumeFollowIndexDescriptor(index))); + + /// + public IResumeFollowIndexResponse ResumeFollowIndex(IResumeFollowIndexRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrResumeFollowDispatch(p, d) + ); + + /// + public Task ResumeFollowIndexAsync(IndexName index, Func selector = null, + CancellationToken cancellationToken = default + ) => + ResumeFollowIndexAsync(selector.InvokeOrDefault(new ResumeFollowIndexDescriptor(index)), cancellationToken); + + /// + public Task ResumeFollowIndexAsync(IResumeFollowIndexRequest request, CancellationToken cancellationToken = default) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrResumeFollowDispatchAsync(p, d, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexRequest.cs b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexRequest.cs new file mode 100644 index 00000000000..6ea58aa9d8e --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.resume_follow.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IResumeFollowIndexRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class ResumeFollowIndexRequest + { + /// + public string Cursor { get; set; } + } + + public partial class ResumeFollowIndexDescriptor + { + string IResumeFollowIndexRequest.Cursor { get; set; } + + /// + public ResumeFollowIndexDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexResponse.cs b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexResponse.cs new file mode 100644 index 00000000000..826618be762 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/ResumeFollowIndex/ResumeFollowIndexResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IResumeFollowIndexResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class ResumeFollowIndexResponse : ResponseBase, IResumeFollowIndexResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/ElasticClient-UnfollowIndex.cs b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/ElasticClient-UnfollowIndex.cs new file mode 100644 index 00000000000..eb051151591 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/ElasticClient-UnfollowIndex.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + IUnfollowIndexResponse UnfollowIndex(IndexName index, Func selector = null); + + /// + IUnfollowIndexResponse UnfollowIndex(IUnfollowIndexRequest request); + + /// + Task UnfollowIndexAsync(IndexName index, Func selector = null, + CancellationToken cancellationToken = default + ); + + /// + Task UnfollowIndexAsync(IUnfollowIndexRequest request, CancellationToken cancellationToken = default); + } + + public partial class ElasticClient + { + /// + public IUnfollowIndexResponse UnfollowIndex(IndexName index, Func selector = null) => + UnfollowIndex(selector.InvokeOrDefault(new UnfollowIndexDescriptor(index))); + + /// + public IUnfollowIndexResponse UnfollowIndex(IUnfollowIndexRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrUnfollowDispatch(p) + ); + + /// + public Task UnfollowIndexAsync(IndexName index, Func selector = null, + CancellationToken cancellationToken = default + ) => + UnfollowIndexAsync(selector.InvokeOrDefault(new UnfollowIndexDescriptor(index)), cancellationToken); + + /// + public Task UnfollowIndexAsync(IUnfollowIndexRequest request, CancellationToken cancellationToken = default) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrUnfollowDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexRequest.cs b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexRequest.cs new file mode 100644 index 00000000000..8275184ff9c --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.unfollow.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface IUnfollowIndexRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class UnfollowIndexRequest + { + /// + public string Cursor { get; set; } + } + + public partial class UnfollowIndexDescriptor + { + string IUnfollowIndexRequest.Cursor { get; set; } + + /// + public UnfollowIndexDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexResponse.cs b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexResponse.cs new file mode 100644 index 00000000000..0a36604fa56 --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Follow/UnfollowIndex/UnfollowIndexResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface IUnfollowIndexResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class UnfollowIndexResponse : ResponseBase, IUnfollowIndexResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsRequest.cs b/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsRequest.cs new file mode 100644 index 00000000000..a475935ca5c --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsRequest.cs @@ -0,0 +1,32 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + [MapsApi("ccr.stats.json")] + [ContractJsonConverter(typeof(ReadAsTypeJsonConverter))] + public partial interface ICcrStatsRequest + { + /// + /// + /// + /// + /// + [JsonProperty("cursor")] + string Cursor { get; set; } + } + + public partial class CcrStatsRequest + { + /// + public string Cursor { get; set; } + } + + public partial class CcrStatsDescriptor + { + string ICcrStatsRequest.Cursor { get; set; } + + /// + public CcrStatsDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs b/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs new file mode 100644 index 00000000000..e941994c37a --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + public interface ICcrStatsResponse : IResponse + { + /// + /// + /// + [JsonProperty("columns")] + IReadOnlyCollection Columns { get; } + } + + public class CcrStatsResponse : ResponseBase, ICcrStatsResponse + { + /// + public IReadOnlyCollection Columns { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/CrossClusterReplication/Stats/ElasticClient-CcrStats.cs b/src/Nest/XPack/CrossClusterReplication/Stats/ElasticClient-CcrStats.cs new file mode 100644 index 00000000000..40a8fa20cfb --- /dev/null +++ b/src/Nest/XPack/CrossClusterReplication/Stats/ElasticClient-CcrStats.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + ICcrStatsResponse CcrStats(Func selector = null); + + /// + ICcrStatsResponse CcrStats(ICcrStatsRequest request); + + /// + Task CcrStatsAsync(Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task CcrStatsAsync(ICcrStatsRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public ICcrStatsResponse CcrStats(Func selector = null) => + CcrStats(selector.InvokeOrDefault(new CcrStatsDescriptor())); + + /// + public ICcrStatsResponse CcrStats(ICcrStatsRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.CcrStatsDispatch(p) + ); + + /// + public Task CcrStatsAsync(Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + CcrStatsAsync(selector.InvokeOrDefault(new CcrStatsDescriptor()), cancellationToken); + + /// + public Task CcrStatsAsync(ICcrStatsRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.CcrStatsDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/_Generated/_Descriptors.generated.cs b/src/Nest/_Generated/_Descriptors.generated.cs index 5c64998b64f..f82cea82ac4 100644 --- a/src/Nest/_Generated/_Descriptors.generated.cs +++ b/src/Nest/_Generated/_Descriptors.generated.cs @@ -3832,130 +3832,116 @@ public UpdateByQueryDescriptor(Indices index) : base(r=>r.Required("index", inde public UpdateByQueryDescriptor Slices(long? slices) => Qs("slices", slices); } ///descriptor for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
- public partial class CcrDeleteAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrDeleteAutoFollowPatternRequest + public partial class DeleteAutoFollowPatternDescriptor : RequestDescriptorBase, IDeleteAutoFollowPatternRequest { /// /_ccr/auto_follow/{name} /// this parameter is required - public CcrDeleteAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} + public DeleteAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} // values part of the url path - Name ICcrDeleteAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + Name IDeleteAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
- public partial class CcrFollowDescriptor : RequestDescriptorBase, ICcrFollowRequest + public partial class CreateFollowIndexDescriptor : RequestDescriptorBase, ICreateFollowIndexRequest { /// /{index}/_ccr/follow /// this parameter is required - public CcrFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + public CreateFollowIndexDescriptor(IndexName index) : base(r=>r.Required("index", index)){} // values part of the url path - IndexName ICcrFollowRequest.Index => Self.RouteValues.Get("index"); + IndexName ICreateFollowIndexRequest.Index => Self.RouteValues.Get("index"); ///The name of the follower index - public CcrFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + public CreateFollowIndexDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); ///a shortcut into calling Index(typeof(TOther)) - public CcrFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + public CreateFollowIndexDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
- public partial class CcrFollowStatsDescriptor : RequestDescriptorBase, ICcrFollowStatsRequest + public partial class FollowIndexStatsDescriptor : RequestDescriptorBase, IFollowIndexStatsRequest { /// /{index}/_ccr/stats - public CcrFollowStatsDescriptor() : base(){} + public FollowIndexStatsDescriptor() : base(){} // values part of the url path - Indices ICcrFollowStatsRequest.Index => Self.RouteValues.Get("index"); + Indices IFollowIndexStatsRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices - public CcrFollowStatsDescriptor Index(Indices index) => Assign(a=>a.RouteValues.Optional("index", index)); + public FollowIndexStatsDescriptor Index(Indices index) => Assign(a=>a.RouteValues.Optional("index", index)); ///a shortcut into calling Index(typeof(TOther)) - public CcrFollowStatsDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Optional("index", (Indices)typeof(TOther))); + public FollowIndexStatsDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Optional("index", (Indices)typeof(TOther))); ///A shortcut into calling Index(Indices.All) - public CcrFollowStatsDescriptor AllIndices() => this.Index(Indices.All); + public FollowIndexStatsDescriptor AllIndices() => this.Index(Indices.All); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
- public partial class CcrGetAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrGetAutoFollowPatternRequest + public partial class GetAutoFollowPatternDescriptor : RequestDescriptorBase, IGetAutoFollowPatternRequest { /// /_ccr/auto_follow - public CcrGetAutoFollowPatternDescriptor() : base(){} + public GetAutoFollowPatternDescriptor() : base(){} // values part of the url path - Name ICcrGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + Name IGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); ///The name of the auto follow pattern. - public CcrGetAutoFollowPatternDescriptor Name(Name name) => Assign(a=>a.RouteValues.Optional("name", name)); + public GetAutoFollowPatternDescriptor Name(Name name) => Assign(a=>a.RouteValues.Optional("name", name)); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
- public partial class CcrPauseFollowDescriptor : RequestDescriptorBase, ICcrPauseFollowRequest + public partial class PauseFollowIndexDescriptor : RequestDescriptorBase, IPauseFollowIndexRequest { /// /{index}/_ccr/pause_follow /// this parameter is required - public CcrPauseFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + public PauseFollowIndexDescriptor(IndexName index) : base(r=>r.Required("index", index)){} // values part of the url path - IndexName ICcrPauseFollowRequest.Index => Self.RouteValues.Get("index"); + IndexName IPauseFollowIndexRequest.Index => Self.RouteValues.Get("index"); ///The name of the follower index that should pause following its leader index. - public CcrPauseFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + public PauseFollowIndexDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); ///a shortcut into calling Index(typeof(TOther)) - public CcrPauseFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + public PauseFollowIndexDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
- public partial class CcrPutAutoFollowPatternDescriptor : RequestDescriptorBase, ICcrPutAutoFollowPatternRequest + public partial class CreateAutoFollowPatternDescriptor : RequestDescriptorBase, ICreateAutoFollowPatternRequest { /// /_ccr/auto_follow/{name} /// this parameter is required - public CcrPutAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} + public CreateAutoFollowPatternDescriptor(Name name) : base(r=>r.Required("name", name)){} // values part of the url path - Name ICcrPutAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + Name ICreateAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
- public partial class CcrResumeFollowDescriptor : RequestDescriptorBase, ICcrResumeFollowRequest + public partial class ResumeFollowIndexDescriptor : RequestDescriptorBase, IResumeFollowIndexRequest { /// /{index}/_ccr/resume_follow /// this parameter is required - public CcrResumeFollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + public ResumeFollowIndexDescriptor(IndexName index) : base(r=>r.Required("index", index)){} // values part of the url path - IndexName ICcrResumeFollowRequest.Index => Self.RouteValues.Get("index"); + IndexName IResumeFollowIndexRequest.Index => Self.RouteValues.Get("index"); ///The name of the follow index to resume following. - public CcrResumeFollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + public ResumeFollowIndexDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); ///a shortcut into calling Index(typeof(TOther)) - public CcrResumeFollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + public ResumeFollowIndexDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for CcrStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
public partial class CcrStatsDescriptor : RequestDescriptorBase, ICcrStatsRequest @@ -3964,28 +3950,24 @@ public partial class CcrStatsDescriptor : RequestDescriptorBasedescriptor for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
- public partial class CcrUnfollowDescriptor : RequestDescriptorBase, ICcrUnfollowRequest + public partial class UnfollowIndexDescriptor : RequestDescriptorBase, IUnfollowIndexRequest { /// /{index}/_ccr/unfollow /// this parameter is required - public CcrUnfollowDescriptor(IndexName index) : base(r=>r.Required("index", index)){} + public UnfollowIndexDescriptor(IndexName index) : base(r=>r.Required("index", index)){} // values part of the url path - IndexName ICcrUnfollowRequest.Index => Self.RouteValues.Get("index"); + IndexName IUnfollowIndexRequest.Index => Self.RouteValues.Get("index"); ///The name of the follower index that should be turned into a regular index. - public CcrUnfollowDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); + public UnfollowIndexDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index)); ///a shortcut into calling Index(typeof(TOther)) - public CcrUnfollowDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); + public UnfollowIndexDescriptor Index() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther))); // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } ///descriptor for XpackGraphExplore
https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
public partial class GraphExploreDescriptor : RequestDescriptorBase,GraphExploreRequestParameters, IGraphExploreRequest>, IGraphExploreRequest diff --git a/src/Nest/_Generated/_LowLevelDispatch.generated.cs b/src/Nest/_Generated/_LowLevelDispatch.generated.cs index 53d9334569a..f85c3f6fab6 100644 --- a/src/Nest/_Generated/_LowLevelDispatch.generated.cs +++ b/src/Nest/_Generated/_LowLevelDispatch.generated.cs @@ -2924,7 +2924,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("UpdateByQuery", p, new [] { POST }, "/{index}/_update_by_query", "/{index}/{type}/_update_by_query"); } - internal TResponse CcrDeleteAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrDeleteAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2935,7 +2935,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrDeleteAutoFollowPattern", p, new [] { DELETE }, "/_ccr/auto_follow/{name}"); } - internal Task CcrDeleteAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrDeleteAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2946,7 +2946,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrDeleteAutoFollowPattern", p, new [] { DELETE }, "/_ccr/auto_follow/{name}"); } - internal TResponse CcrFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2957,7 +2957,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrFollow", p, new [] { PUT }, "/{index}/_ccr/follow"); } - internal Task CcrFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2968,7 +2968,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrFollow", p, new [] { PUT }, "/{index}/_ccr/follow"); } - internal TResponse CcrFollowStatsDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrFollowStatsDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2979,7 +2979,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrFollowStats", p, new [] { GET }, "/{index}/_ccr/stats"); } - internal Task CcrFollowStatsDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrFollowStatsDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -2990,7 +2990,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrFollowStats", p, new [] { GET }, "/{index}/_ccr/stats"); } - internal TResponse CcrGetAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrGetAutoFollowPatternDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3001,7 +3001,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrGetAutoFollowPattern", p, new [] { GET }, "/_ccr/auto_follow", "/_ccr/auto_follow/{name}"); } - internal Task CcrGetAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrGetAutoFollowPatternDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3012,7 +3012,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrGetAutoFollowPattern", p, new [] { GET }, "/_ccr/auto_follow", "/_ccr/auto_follow/{name}"); } - internal TResponse CcrPauseFollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrPauseFollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3023,7 +3023,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrPauseFollow", p, new [] { POST }, "/{index}/_ccr/pause_follow"); } - internal Task CcrPauseFollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrPauseFollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3034,7 +3034,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrPauseFollow", p, new [] { POST }, "/{index}/_ccr/pause_follow"); } - internal TResponse CcrPutAutoFollowPatternDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrPutAutoFollowPatternDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3045,7 +3045,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrPutAutoFollowPattern", p, new [] { PUT }, "/_ccr/auto_follow/{name}"); } - internal Task CcrPutAutoFollowPatternDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrPutAutoFollowPatternDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3056,7 +3056,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrPutAutoFollowPattern", p, new [] { PUT }, "/_ccr/auto_follow/{name}"); } - internal TResponse CcrResumeFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrResumeFollowDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3067,7 +3067,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrResumeFollow", p, new [] { POST }, "/{index}/_ccr/resume_follow"); } - internal Task CcrResumeFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrResumeFollowDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3098,7 +3098,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrStats", p, new [] { GET }, "/_ccr/stats"); } - internal TResponse CcrUnfollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + internal TResponse CcrUnfollowDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { @@ -3109,7 +3109,7 @@ internal partial class LowLevelDispatch throw InvalidDispatch("CcrUnfollow", p, new [] { POST }, "/{index}/_ccr/unfollow"); } - internal Task CcrUnfollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + internal Task CcrUnfollowDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) { diff --git a/src/Nest/_Generated/_Requests.generated.cs b/src/Nest/_Generated/_Requests.generated.cs index 2a4ad7c7fa0..b95093f2b27 100644 --- a/src/Nest/_Generated/_Requests.generated.cs +++ b/src/Nest/_Generated/_Requests.generated.cs @@ -862,134 +862,6 @@ public CatThreadPoolRequest(Names thread_pool_patterns) : base(r=>r.Optional("th public bool? Verbose { get => Q("v"); set => Q("v", value); } } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrDeleteAutoFollowPatternRequest : IRequest - { - Name Name { get; } - } - ///Request parameters for CcrDeleteAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
- public partial class CcrDeleteAutoFollowPatternRequest : PlainRequestBase, ICcrDeleteAutoFollowPatternRequest - { - protected ICcrDeleteAutoFollowPatternRequest Self => this; - ////_ccr/auto_follow/{name} - ///this parameter is required - public CcrDeleteAutoFollowPatternRequest(Name name) : base(r=>r.Required("name", name)){} - // values part of the url path - Name ICcrDeleteAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrFollowRequest : IRequest - { - IndexName Index { get; } - } - ///Request parameters for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
- public partial class CcrFollowRequest : PlainRequestBase, ICcrFollowRequest - { - protected ICcrFollowRequest Self => this; - ////{index}/_ccr/follow - ///this parameter is required - public CcrFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} - // values part of the url path - IndexName ICcrFollowRequest.Index => Self.RouteValues.Get("index"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrFollowStatsRequest : IRequest - { - Indices Index { get; } - } - ///Request parameters for CcrFollowStats
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
- public partial class CcrFollowStatsRequest : PlainRequestBase, ICcrFollowStatsRequest - { - protected ICcrFollowStatsRequest Self => this; - ////{index}/_ccr/stats - ///Optional, accepts null - public CcrFollowStatsRequest(Indices index) : base(r=>r.Optional("index", index)){} - // values part of the url path - Indices ICcrFollowStatsRequest.Index => Self.RouteValues.Get("index"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrGetAutoFollowPatternRequest : IRequest - { - Name Name { get; } - } - ///Request parameters for CcrGetAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
- public partial class CcrGetAutoFollowPatternRequest : PlainRequestBase, ICcrGetAutoFollowPatternRequest - { - protected ICcrGetAutoFollowPatternRequest Self => this; - ////_ccr/auto_follow - public CcrGetAutoFollowPatternRequest() : base(){} - ////_ccr/auto_follow/{name} - ///Optional, accepts null - public CcrGetAutoFollowPatternRequest(Name name) : base(r=>r.Optional("name", name)){} - // values part of the url path - Name ICcrGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrPauseFollowRequest : IRequest - { - IndexName Index { get; } - } - ///Request parameters for CcrPauseFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
- public partial class CcrPauseFollowRequest : PlainRequestBase, ICcrPauseFollowRequest - { - protected ICcrPauseFollowRequest Self => this; - ////{index}/_ccr/pause_follow - ///this parameter is required - public CcrPauseFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} - // values part of the url path - IndexName ICcrPauseFollowRequest.Index => Self.RouteValues.Get("index"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrPutAutoFollowPatternRequest : IRequest - { - Name Name { get; } - } - ///Request parameters for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
- public partial class CcrPutAutoFollowPatternRequest : PlainRequestBase, ICcrPutAutoFollowPatternRequest - { - protected ICcrPutAutoFollowPatternRequest Self => this; - ////_ccr/auto_follow/{name} - ///this parameter is required - public CcrPutAutoFollowPatternRequest(Name name) : base(r=>r.Required("name", name)){} - // values part of the url path - Name ICcrPutAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface ICcrResumeFollowRequest : IRequest - { - IndexName Index { get; } - } - ///Request parameters for CcrResumeFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
- public partial class CcrResumeFollowRequest : PlainRequestBase, ICcrResumeFollowRequest - { - protected ICcrResumeFollowRequest Self => this; - ////{index}/_ccr/resume_follow - ///this parameter is required - public CcrResumeFollowRequest(IndexName index) : base(r=>r.Required("index", index)){} - // values part of the url path - IndexName ICcrResumeFollowRequest.Index => Self.RouteValues.Get("index"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface ICcrStatsRequest : IRequest { } @@ -1000,25 +872,6 @@ public partial class CcrStatsRequest : PlainRequestBase - { - IndexName Index { get; } - } - ///Request parameters for CcrUnfollow
http://www.elastic.co/guide/en/elasticsearch/reference/current
- public partial class CcrUnfollowRequest : PlainRequestBase, ICcrUnfollowRequest - { - protected ICcrUnfollowRequest Self => this; - ////{index}/_ccr/unfollow - ///this parameter is required - public CcrUnfollowRequest(IndexName index) : base(r=>r.Required("index", index)){} - // values part of the url path - IndexName ICcrUnfollowRequest.Index => Self.RouteValues.Get("index"); - - // Request parameters - //TODO THIS METHOD IS UNMAPPED! } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface IChangePasswordRequest : IRequest @@ -1510,6 +1363,40 @@ public CountRequest(Indices index, Types type) : base(r=>r.Optional("index", ind public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICreateAutoFollowPatternRequest : IRequest + { + Name Name { get; } + } + ///Request parameters for CcrPutAutoFollowPattern
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
+ public partial class CreateAutoFollowPatternRequest : PlainRequestBase, ICreateAutoFollowPatternRequest + { + protected ICreateAutoFollowPatternRequest Self => this; + ////_ccr/auto_follow/{name} + ///this parameter is required + public CreateAutoFollowPatternRequest(Name name) : base(r=>r.Required("name", name)){} + // values part of the url path + Name ICreateAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface ICreateFollowIndexRequest : IRequest + { + IndexName Index { get; } + } + ///Request parameters for CcrFollow
https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
+ public partial class CreateFollowIndexRequest : PlainRequestBase, ICreateFollowIndexRequest + { + protected ICreateFollowIndexRequest Self => this; + ////{index}/_ccr/follow + ///this parameter is required + public CreateFollowIndexRequest(IndexName index) : base(r=>r.Required("index", index)){} + // values part of the url path + IndexName ICreateFollowIndexRequest.Index => Self.RouteValues.Get("index"); + + // Request parameters + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface ICreateIndexRequest : IRequest { IndexName Index { get; } @@ -1679,6 +1566,23 @@ public DeleteAliasRequest(Indices index, Names name) : base(r=>r.Required("index public Time MasterTimeout { get => Q