Skip to content

Commit 0e5d1b6

Browse files
Add CCR APIs (#6232) (#6233)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 852f138 commit 0e5d1b6

40 files changed

+3616
-0
lines changed

src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ internal static class ApiUrlsLookups
2424
internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "/_async_search/{id}" });
2525
internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "/_async_search/{id}" });
2626
internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "/_bulk", "/{index}/_bulk" });
27+
internal static ApiUrls CrossClusterReplicationDeleteAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow/{name}" });
28+
internal static ApiUrls CrossClusterReplicationFollowInfo = new ApiUrls(new[] { "/{index}/_ccr/info" });
29+
internal static ApiUrls CrossClusterReplicationFollow = new ApiUrls(new[] { "/{index}/_ccr/follow" });
30+
internal static ApiUrls CrossClusterReplicationFollowStats = new ApiUrls(new[] { "/{index}/_ccr/stats" });
31+
internal static ApiUrls CrossClusterReplicationForgetFollower = new ApiUrls(new[] { "/{index}/_ccr/forget_follower" });
32+
internal static ApiUrls CrossClusterReplicationGetAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow", "/_ccr/auto_follow/{name}" });
33+
internal static ApiUrls CrossClusterReplicationPauseAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow/{name}/pause" });
34+
internal static ApiUrls CrossClusterReplicationPauseFollow = new ApiUrls(new[] { "/{index}/_ccr/pause_follow" });
35+
internal static ApiUrls CrossClusterReplicationPutAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow/{name}" });
36+
internal static ApiUrls CrossClusterReplicationResumeAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow/{name}/resume" });
37+
internal static ApiUrls CrossClusterReplicationResumeFollow = new ApiUrls(new[] { "/{index}/_ccr/resume_follow" });
38+
internal static ApiUrls CrossClusterReplicationStats = new ApiUrls(new[] { "/_ccr/stats" });
39+
internal static ApiUrls CrossClusterReplicationUnfollow = new ApiUrls(new[] { "/{index}/_ccr/unfollow" });
2740
internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "/_pit" });
2841
internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "/_cluster/allocation/explain" });
2942
internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "/_cluster/health", "/_cluster/health/{index}" });
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport;
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Linq.Expressions;
22+
using System.Text.Json;
23+
using System.Text.Json.Serialization;
24+
25+
#nullable restore
26+
namespace Elastic.Clients.Elasticsearch.Ccr
27+
{
28+
public class CcrDeleteAutoFollowPatternRequestParameters : RequestParameters<CcrDeleteAutoFollowPatternRequestParameters>
29+
{
30+
}
31+
32+
public partial class CcrDeleteAutoFollowPatternRequest : PlainRequestBase<CcrDeleteAutoFollowPatternRequestParameters>
33+
{
34+
public CcrDeleteAutoFollowPatternRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name))
35+
{
36+
}
37+
38+
internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationDeleteAutoFollowPattern;
39+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
40+
protected override bool SupportsBody => false;
41+
}
42+
43+
public sealed partial class CcrDeleteAutoFollowPatternRequestDescriptor : RequestDescriptorBase<CcrDeleteAutoFollowPatternRequestDescriptor, CcrDeleteAutoFollowPatternRequestParameters>
44+
{
45+
internal CcrDeleteAutoFollowPatternRequestDescriptor(Action<CcrDeleteAutoFollowPatternRequestDescriptor> configure) => configure.Invoke(this);
46+
public CcrDeleteAutoFollowPatternRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name))
47+
{
48+
}
49+
50+
internal CcrDeleteAutoFollowPatternRequestDescriptor()
51+
{
52+
}
53+
54+
internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationDeleteAutoFollowPattern;
55+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
56+
protected override bool SupportsBody => false;
57+
public CcrDeleteAutoFollowPatternRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name)
58+
{
59+
RouteValues.Required("name", name);
60+
return Self;
61+
}
62+
63+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
64+
{
65+
}
66+
}
67+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport.Products.Elasticsearch;
19+
using System.Collections.Generic;
20+
using System.Text.Json.Serialization;
21+
22+
#nullable restore
23+
namespace Elastic.Clients.Elasticsearch.Ccr
24+
{
25+
public partial class CcrDeleteAutoFollowPatternResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("acknowledged")]
29+
public bool Acknowledged { get; init; }
30+
}
31+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport;
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Linq.Expressions;
22+
using System.Text.Json;
23+
using System.Text.Json.Serialization;
24+
25+
#nullable restore
26+
namespace Elastic.Clients.Elasticsearch.Ccr
27+
{
28+
public class CcrFollowInfoRequestParameters : RequestParameters<CcrFollowInfoRequestParameters>
29+
{
30+
}
31+
32+
public partial class CcrFollowInfoRequest : PlainRequestBase<CcrFollowInfoRequestParameters>
33+
{
34+
public CcrFollowInfoRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices))
35+
{
36+
}
37+
38+
internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationFollowInfo;
39+
protected override HttpMethod HttpMethod => HttpMethod.GET;
40+
protected override bool SupportsBody => false;
41+
}
42+
43+
public sealed partial class CcrFollowInfoRequestDescriptor<TDocument> : RequestDescriptorBase<CcrFollowInfoRequestDescriptor<TDocument>, CcrFollowInfoRequestParameters>
44+
{
45+
internal CcrFollowInfoRequestDescriptor(Action<CcrFollowInfoRequestDescriptor<TDocument>> configure) => configure.Invoke(this);
46+
public CcrFollowInfoRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices))
47+
{
48+
}
49+
50+
internal CcrFollowInfoRequestDescriptor()
51+
{
52+
}
53+
54+
internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationFollowInfo;
55+
protected override HttpMethod HttpMethod => HttpMethod.GET;
56+
protected override bool SupportsBody => false;
57+
public CcrFollowInfoRequestDescriptor<TDocument> Indices(Elastic.Clients.Elasticsearch.Indices indices)
58+
{
59+
RouteValues.Required("index", indices);
60+
return Self;
61+
}
62+
63+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
64+
{
65+
}
66+
}
67+
68+
public sealed partial class CcrFollowInfoRequestDescriptor : RequestDescriptorBase<CcrFollowInfoRequestDescriptor, CcrFollowInfoRequestParameters>
69+
{
70+
internal CcrFollowInfoRequestDescriptor(Action<CcrFollowInfoRequestDescriptor> configure) => configure.Invoke(this);
71+
public CcrFollowInfoRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices))
72+
{
73+
}
74+
75+
internal CcrFollowInfoRequestDescriptor()
76+
{
77+
}
78+
79+
internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationFollowInfo;
80+
protected override HttpMethod HttpMethod => HttpMethod.GET;
81+
protected override bool SupportsBody => false;
82+
public CcrFollowInfoRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices)
83+
{
84+
RouteValues.Required("index", indices);
85+
return Self;
86+
}
87+
88+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
89+
{
90+
}
91+
}
92+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport.Products.Elasticsearch;
19+
using System.Collections.Generic;
20+
using System.Text.Json.Serialization;
21+
22+
#nullable restore
23+
namespace Elastic.Clients.Elasticsearch.Ccr
24+
{
25+
public partial class CcrFollowInfoResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("follower_indices")]
29+
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Ccr.FollowInfo.FollowerIndex> FollowerIndices { get; init; }
30+
}
31+
}

0 commit comments

Comments
 (0)