Skip to content

Commit aac2dd4

Browse files
committed
Initial code gen for CCR
1 parent c7f462c commit aac2dd4

File tree

11 files changed

+828
-19
lines changed

11 files changed

+828
-19
lines changed

src/CodeGeneration/ApiGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private static void Main(string[] args)
4040
RestSpecDownloader.Download(downloadBranch);
4141

4242
ApiGenerator.Generate(downloadBranch, "Core", "Graph", "License", "Security", "Watcher", "Info", "MachineLearning", "Migration", "Sql",
43-
"Rollup");
43+
"Rollup", "Ccr");
4444
}
4545
}
4646
}

src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,51 @@ public partial class UpdateByQueryRequestParameters : RequestParameters<UpdateBy
21802180
///<summary>The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.</summary>
21812181
public long? Slices { get => Q<long?>("slices"); set => Q("slices", value); }
21822182
}
2183+
///<summary>Request options for CcrDeleteAutoFollowPattern<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html</pre></summary>
2184+
public partial class CcrDeleteAutoFollowPatternRequestParameters : RequestParameters<CcrDeleteAutoFollowPatternRequestParameters>
2185+
{
2186+
public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
2187+
}
2188+
///<summary>Request options for CcrFollow<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html</pre></summary>
2189+
public partial class CcrFollowRequestParameters : RequestParameters<CcrFollowRequestParameters>
2190+
{
2191+
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
2192+
}
2193+
///<summary>Request options for CcrFollowStats<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html</pre></summary>
2194+
public partial class CcrFollowStatsRequestParameters : RequestParameters<CcrFollowStatsRequestParameters>
2195+
{
2196+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
2197+
}
2198+
///<summary>Request options for CcrGetAutoFollowPattern<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html</pre></summary>
2199+
public partial class CcrGetAutoFollowPatternRequestParameters : RequestParameters<CcrGetAutoFollowPatternRequestParameters>
2200+
{
2201+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
2202+
}
2203+
///<summary>Request options for CcrPauseFollow<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html</pre></summary>
2204+
public partial class CcrPauseFollowRequestParameters : RequestParameters<CcrPauseFollowRequestParameters>
2205+
{
2206+
public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
2207+
}
2208+
///<summary>Request options for CcrPutAutoFollowPattern<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html</pre></summary>
2209+
public partial class CcrPutAutoFollowPatternRequestParameters : RequestParameters<CcrPutAutoFollowPatternRequestParameters>
2210+
{
2211+
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
2212+
}
2213+
///<summary>Request options for CcrResumeFollow<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html</pre></summary>
2214+
public partial class CcrResumeFollowRequestParameters : RequestParameters<CcrResumeFollowRequestParameters>
2215+
{
2216+
public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
2217+
}
2218+
///<summary>Request options for CcrStats<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html</pre></summary>
2219+
public partial class CcrStatsRequestParameters : RequestParameters<CcrStatsRequestParameters>
2220+
{
2221+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
2222+
}
2223+
///<summary>Request options for CcrUnfollow<pre>http://www.elastic.co/guide/en/elasticsearch/reference/current</pre></summary>
2224+
public partial class CcrUnfollowRequestParameters : RequestParameters<CcrUnfollowRequestParameters>
2225+
{
2226+
public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
2227+
}
21832228
///<summary>Request options for XpackGraphExplore<pre>https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html</pre></summary>
21842229
public partial class GraphExploreRequestParameters : RequestParameters<GraphExploreRequestParameters>
21852230
{

src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,108 @@ public TResponse UpdateByQuery<TResponse>(string index, string type, PostData bo
29122912
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
29132913
public Task<TResponse> UpdateByQueryAsync<TResponse>(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
29142914
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(POST, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_update_by_query"), ctx, body, _params(requestParameters));
2915+
///<summary>DELETE on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html</para></summary>
2916+
///<param name="name">The name of the auto follow pattern.</param>
2917+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2918+
public TResponse CcrDeleteAutoFollowPattern<TResponse>(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null)
2919+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters));
2920+
///<summary>DELETE on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html</para></summary>
2921+
///<param name="name">The name of the auto follow pattern.</param>
2922+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2923+
public Task<TResponse> CcrDeleteAutoFollowPatternAsync<TResponse>(string name, CcrDeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2924+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(DELETE, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters));
2925+
///<summary>PUT on /{index}/_ccr/follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html</para></summary>
2926+
///<param name="index">The name of the follower index</param>
2927+
///<param name="body">The name of the leader index and other optional ccr related parameters</param>
2928+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2929+
public TResponse CcrFollow<TResponse>(string index, PostData body, CcrFollowRequestParameters requestParameters = null)
2930+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), body, _params(requestParameters));
2931+
///<summary>PUT on /{index}/_ccr/follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html</para></summary>
2932+
///<param name="index">The name of the follower index</param>
2933+
///<param name="body">The name of the leader index and other optional ccr related parameters</param>
2934+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2935+
public Task<TResponse> CcrFollowAsync<TResponse>(string index, PostData body, CcrFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2936+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(PUT, Url($"{index.NotNull("index")}/_ccr/follow"), ctx, body, _params(requestParameters));
2937+
///<summary>GET on /{index}/_ccr/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html</para></summary>
2938+
///<param name="index">A comma-separated list of index patterns; use `_all` to perform the operation on all indices</param>
2939+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2940+
public TResponse CcrFollowStats<TResponse>(string index, CcrFollowStatsRequestParameters requestParameters = null)
2941+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(GET, Url($"{index.NotNull("index")}/_ccr/stats"), null, _params(requestParameters));
2942+
///<summary>GET on /{index}/_ccr/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html</para></summary>
2943+
///<param name="index">A comma-separated list of index patterns; use `_all` to perform the operation on all indices</param>
2944+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2945+
public Task<TResponse> CcrFollowStatsAsync<TResponse>(string index, CcrFollowStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2946+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(GET, Url($"{index.NotNull("index")}/_ccr/stats"), ctx, null, _params(requestParameters));
2947+
///<summary>GET on /_ccr/auto_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html</para></summary>
2948+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2949+
public TResponse CcrGetAutoFollowPattern<TResponse>(CcrGetAutoFollowPatternRequestParameters requestParameters = null)
2950+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(GET, Url($"_ccr/auto_follow"), null, _params(requestParameters));
2951+
///<summary>GET on /_ccr/auto_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html</para></summary>
2952+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2953+
public Task<TResponse> CcrGetAutoFollowPatternAsync<TResponse>(CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2954+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(GET, Url($"_ccr/auto_follow"), ctx, null, _params(requestParameters));
2955+
///<summary>GET on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html</para></summary>
2956+
///<param name="name">The name of the auto follow pattern.</param>
2957+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2958+
public TResponse CcrGetAutoFollowPattern<TResponse>(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null)
2959+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), null, _params(requestParameters));
2960+
///<summary>GET on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html</para></summary>
2961+
///<param name="name">The name of the auto follow pattern.</param>
2962+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2963+
public Task<TResponse> CcrGetAutoFollowPatternAsync<TResponse>(string name, CcrGetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2964+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(GET, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, null, _params(requestParameters));
2965+
///<summary>POST on /{index}/_ccr/pause_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html</para></summary>
2966+
///<param name="index">The name of the follower index that should pause following its leader index.</param>
2967+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2968+
public TResponse CcrPauseFollow<TResponse>(string index, CcrPauseFollowRequestParameters requestParameters = null)
2969+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), null, _params(requestParameters));
2970+
///<summary>POST on /{index}/_ccr/pause_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html</para></summary>
2971+
///<param name="index">The name of the follower index that should pause following its leader index.</param>
2972+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2973+
public Task<TResponse> CcrPauseFollowAsync<TResponse>(string index, CcrPauseFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2974+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/pause_follow"), ctx, null, _params(requestParameters));
2975+
///<summary>PUT on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html</para></summary>
2976+
///<param name="name">The name of the auto follow pattern.</param>
2977+
///<param name="body">The specification of the auto follow pattern</param>
2978+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2979+
public TResponse CcrPutAutoFollowPattern<TResponse>(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null)
2980+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), body, _params(requestParameters));
2981+
///<summary>PUT on /_ccr/auto_follow/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html</para></summary>
2982+
///<param name="name">The name of the auto follow pattern.</param>
2983+
///<param name="body">The specification of the auto follow pattern</param>
2984+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2985+
public Task<TResponse> CcrPutAutoFollowPatternAsync<TResponse>(string name, PostData body, CcrPutAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2986+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(PUT, Url($"_ccr/auto_follow/{name.NotNull("name")}"), ctx, body, _params(requestParameters));
2987+
///<summary>POST on /{index}/_ccr/resume_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html</para></summary>
2988+
///<param name="index">The name of the follow index to resume following.</param>
2989+
///<param name="body">The name of the leader index and other optional ccr related parameters</param>
2990+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2991+
public TResponse CcrResumeFollow<TResponse>(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null)
2992+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), body, _params(requestParameters));
2993+
///<summary>POST on /{index}/_ccr/resume_follow <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html</para></summary>
2994+
///<param name="index">The name of the follow index to resume following.</param>
2995+
///<param name="body">The name of the leader index and other optional ccr related parameters</param>
2996+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2997+
public Task<TResponse> CcrResumeFollowAsync<TResponse>(string index, PostData body, CcrResumeFollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
2998+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/resume_follow"), ctx, body, _params(requestParameters));
2999+
///<summary>GET on /_ccr/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html</para></summary>
3000+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
3001+
public TResponse CcrStats<TResponse>(CcrStatsRequestParameters requestParameters = null)
3002+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(GET, Url($"_ccr/stats"), null, _params(requestParameters));
3003+
///<summary>GET on /_ccr/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html</para></summary>
3004+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
3005+
public Task<TResponse> CcrStatsAsync<TResponse>(CcrStatsRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
3006+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(GET, Url($"_ccr/stats"), ctx, null, _params(requestParameters));
3007+
///<summary>POST on /{index}/_ccr/unfollow <para>http://www.elastic.co/guide/en/elasticsearch/reference/current</para></summary>
3008+
///<param name="index">The name of the follower index that should be turned into a regular index.</param>
3009+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
3010+
public TResponse CcrUnfollow<TResponse>(string index, CcrUnfollowRequestParameters requestParameters = null)
3011+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequest<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), null, _params(requestParameters));
3012+
///<summary>POST on /{index}/_ccr/unfollow <para>http://www.elastic.co/guide/en/elasticsearch/reference/current</para></summary>
3013+
///<param name="index">The name of the follower index that should be turned into a regular index.</param>
3014+
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
3015+
public Task<TResponse> CcrUnfollowAsync<TResponse>(string index, CcrUnfollowRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken))
3016+
where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync<TResponse>(POST, Url($"{index.NotNull("index")}/_ccr/unfollow"), ctx, null, _params(requestParameters));
29153017
///<summary>GET on /{index}/_xpack/graph/_explore <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html</para></summary>
29163018
///<param name="index">A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices</param>
29173019
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>

0 commit comments

Comments
 (0)