Skip to content

Commit 6073250

Browse files
committed
Merge branch 'feature/cat-apis' into develop
2 parents 7b836e3 + 89513a6 commit 6073250

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2610
-320
lines changed

src/CodeGeneration/CodeGeneration.LowLevelClient/Views/ElasticsearchClient.Generated.cshtml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ namespace Elasticsearch.Net
8585
else {
8686
@if (url.StartsWith("_cat"))
8787
{
88-
<text>requestParams.RequestConfiguration.ContentType = "text/plain";</text>
88+
<text>if (string.IsNullOrWhiteSpace(requestParams.RequestConfiguration.ContentType)) {
89+
requestParams.RequestConfiguration.ContentType = "text/plain";
90+
}</text>
8991
}
9092
@if (method.Allow404)
9193
{
92-
<text>requestParams.RequestConfiguration.AllowedStatusCodes = new [] { 404 };</text>
94+
<text> if (requestParams.RequestConfiguration.AllowedStatusCodes == null) {
95+
requestParams.RequestConfiguration.AllowedStatusCodes = new [] { 404 };
96+
}</text>
9397
}
9498
}
9599
</text>

src/Elasticsearch.Net/ElasticsearchClient.Generated.cs

Lines changed: 336 additions & 112 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
internal static class CatRequestPathInfo
11+
{
12+
public static void Update(IElasticsearchPathInfo pathInfo)
13+
{
14+
pathInfo.HttpMethod = PathInfoHttpMethod.GET;
15+
}
16+
}
17+
18+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
19+
public interface ICatAliasesRequest : IRequest<CatAliasesRequestParameters>
20+
{
21+
}
22+
23+
public partial class CatAliasesRequest : BasePathRequest<CatAliasesRequestParameters>, ICatAliasesRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatAliasesRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
31+
public partial class CatAliasesDescriptor : BasePathDescriptor<CatAliasesDescriptor, CatAliasesRequestParameters>, ICatAliasesRequest
32+
{
33+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatAliasesRequestParameters> pathInfo)
34+
{
35+
CatRequestPathInfo.Update(pathInfo);
36+
}
37+
}
38+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatAllocationRequest : IRequest<CatAllocationRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatAllocationRequest : BasePathRequest<CatAllocationRequestParameters>, ICatAllocationRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatAllocationRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatAllocationDescriptor : BasePathDescriptor<CatAllocationDescriptor, CatAllocationRequestParameters>, ICatAllocationRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatAllocationRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}

src/Nest/DSL/CatCountDescriptor.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatCountRequest : IRequest<CatCountRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatCountRequest : BasePathRequest<CatCountRequestParameters>, ICatCountRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatCountRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatCountDescriptor : BasePathDescriptor<CatCountDescriptor, CatCountRequestParameters>, ICatCountRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatCountRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatFielddataRequest : IRequest<CatFielddataRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatFielddataRequest : BasePathRequest<CatFielddataRequestParameters>, ICatFielddataRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatFielddataRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatFielddataDescriptor : BasePathDescriptor<CatFielddataDescriptor, CatFielddataRequestParameters>, ICatFielddataRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatFielddataRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatHealthRequest : IRequest<CatHealthRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatHealthRequest : BasePathRequest<CatHealthRequestParameters>, ICatHealthRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatHealthRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatHealthDescriptor : BasePathDescriptor<CatHealthDescriptor, CatHealthRequestParameters>, ICatHealthRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatHealthRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatIndicesRequest : IRequest<CatIndicesRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatIndicesRequest : BasePathRequest<CatIndicesRequestParameters>, ICatIndicesRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatIndicesRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatIndicesDescriptor : BasePathDescriptor<CatIndicesDescriptor, CatIndicesRequestParameters>, ICatIndicesRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatIndicesRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatMasterRequest : IRequest<CatMasterRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatMasterRequest : BasePathRequest<CatMasterRequestParameters>, ICatMasterRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatMasterRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatMasterDescriptor : BasePathDescriptor<CatMasterDescriptor, CatMasterRequestParameters>, ICatMasterRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatMasterRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}

src/Nest/DSL/CatNodesDescriptor.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Elasticsearch.Net;
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace Nest
9+
{
10+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
11+
public interface ICatNodesRequest : IRequest<CatNodesRequestParameters>
12+
{
13+
}
14+
15+
public partial class CatNodesRequest : BasePathRequest<CatNodesRequestParameters>, ICatNodesRequest
16+
{
17+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatNodesRequestParameters> pathInfo)
18+
{
19+
CatRequestPathInfo.Update(pathInfo);
20+
}
21+
}
22+
23+
public partial class CatNodesDescriptor : BasePathDescriptor<CatNodesDescriptor, CatNodesRequestParameters>, ICatNodesRequest
24+
{
25+
protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo<CatNodesRequestParameters> pathInfo)
26+
{
27+
CatRequestPathInfo.Update(pathInfo);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)