Skip to content

Commit c148c4d

Browse files
Add Xpack APIs (#6293) (#6294)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 69fd2b1 commit c148c4d

File tree

82 files changed

+3921
-0
lines changed

Some content is hidden

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

82 files changed

+3921
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,7 @@ internal static class ApiUrlsLookups
162162
internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "/{index}/_update_by_query" });
163163
internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "/_update_by_query/{task_id}/_rethrottle" });
164164
internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "/{index}/_update/{id}" });
165+
internal static ApiUrls XpackInfo = new ApiUrls(new[] { "/_xpack" });
166+
internal static ApiUrls XpackUsage = new ApiUrls(new[] { "/_xpack/usage" });
165167
}
166168
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.Xpack
27+
{
28+
public class XpackInfoRequestParameters : RequestParameters<XpackInfoRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public IEnumerable<string>? Categories { get => Q<IEnumerable<string>?>("categories"); set => Q("categories", value); }
32+
33+
[JsonIgnore]
34+
public bool? AcceptEnterprise { get => Q<bool?>("accept_enterprise"); set => Q("accept_enterprise", value); }
35+
}
36+
37+
public partial class XpackInfoRequest : PlainRequestBase<XpackInfoRequestParameters>
38+
{
39+
internal override ApiUrls ApiUrls => ApiUrlsLookups.XpackInfo;
40+
protected override HttpMethod HttpMethod => HttpMethod.GET;
41+
protected override bool SupportsBody => false;
42+
[JsonIgnore]
43+
public IEnumerable<string>? Categories { get => Q<IEnumerable<string>?>("categories"); set => Q("categories", value); }
44+
45+
[JsonIgnore]
46+
public bool? AcceptEnterprise { get => Q<bool?>("accept_enterprise"); set => Q("accept_enterprise", value); }
47+
}
48+
49+
public sealed partial class XpackInfoRequestDescriptor : RequestDescriptorBase<XpackInfoRequestDescriptor, XpackInfoRequestParameters>
50+
{
51+
internal XpackInfoRequestDescriptor(Action<XpackInfoRequestDescriptor> configure) => configure.Invoke(this);
52+
public XpackInfoRequestDescriptor()
53+
{
54+
}
55+
56+
internal override ApiUrls ApiUrls => ApiUrlsLookups.XpackInfo;
57+
protected override HttpMethod HttpMethod => HttpMethod.GET;
58+
protected override bool SupportsBody => false;
59+
public XpackInfoRequestDescriptor AcceptEnterprise(bool? acceptEnterprise = true) => Qs("accept_enterprise", acceptEnterprise);
60+
public XpackInfoRequestDescriptor Categories(IEnumerable<string>? categories) => Qs("categories", categories);
61+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
62+
{
63+
}
64+
}
65+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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.Xpack
24+
{
25+
public partial class XpackInfoResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("build")]
29+
public Elastic.Clients.Elasticsearch.Xpack.BuildInformation Build { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("features")]
33+
public Elastic.Clients.Elasticsearch.Xpack.Features Features { get; init; }
34+
35+
[JsonInclude]
36+
[JsonPropertyName("license")]
37+
public Elastic.Clients.Elasticsearch.Xpack.MinimalLicenseInformation License { get; init; }
38+
39+
[JsonInclude]
40+
[JsonPropertyName("tagline")]
41+
public string Tagline { get; init; }
42+
}
43+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.Xpack
27+
{
28+
public class XpackUsageRequestParameters : RequestParameters<XpackUsageRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
32+
}
33+
34+
public partial class XpackUsageRequest : PlainRequestBase<XpackUsageRequestParameters>
35+
{
36+
internal override ApiUrls ApiUrls => ApiUrlsLookups.XpackUsage;
37+
protected override HttpMethod HttpMethod => HttpMethod.GET;
38+
protected override bool SupportsBody => false;
39+
[JsonIgnore]
40+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
41+
}
42+
43+
public sealed partial class XpackUsageRequestDescriptor : RequestDescriptorBase<XpackUsageRequestDescriptor, XpackUsageRequestParameters>
44+
{
45+
internal XpackUsageRequestDescriptor(Action<XpackUsageRequestDescriptor> configure) => configure.Invoke(this);
46+
public XpackUsageRequestDescriptor()
47+
{
48+
}
49+
50+
internal override ApiUrls ApiUrls => ApiUrlsLookups.XpackUsage;
51+
protected override HttpMethod HttpMethod => HttpMethod.GET;
52+
protected override bool SupportsBody => false;
53+
public XpackUsageRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout);
54+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
55+
{
56+
}
57+
}
58+
}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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.Xpack
24+
{
25+
public partial class XpackUsageResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("aggregate_metric")]
29+
public Elastic.Clients.Elasticsearch.Xpack.Base AggregateMetric { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("analytics")]
33+
public Elastic.Clients.Elasticsearch.Xpack.Analytics Analytics { get; init; }
34+
35+
[JsonInclude]
36+
[JsonPropertyName("ccr")]
37+
public Elastic.Clients.Elasticsearch.Xpack.Ccr Ccr { get; init; }
38+
39+
[JsonInclude]
40+
[JsonPropertyName("data_frame")]
41+
public Elastic.Clients.Elasticsearch.Xpack.Base? DataFrame { get; init; }
42+
43+
[JsonInclude]
44+
[JsonPropertyName("data_science")]
45+
public Elastic.Clients.Elasticsearch.Xpack.Base? DataScience { get; init; }
46+
47+
[JsonInclude]
48+
[JsonPropertyName("data_streams")]
49+
public Elastic.Clients.Elasticsearch.Xpack.DataStreams? DataStreams { get; init; }
50+
51+
[JsonInclude]
52+
[JsonPropertyName("data_tiers")]
53+
public Elastic.Clients.Elasticsearch.Xpack.DataTiers DataTiers { get; init; }
54+
55+
[JsonInclude]
56+
[JsonPropertyName("enrich")]
57+
public Elastic.Clients.Elasticsearch.Xpack.Base? Enrich { get; init; }
58+
59+
[JsonInclude]
60+
[JsonPropertyName("eql")]
61+
public Elastic.Clients.Elasticsearch.Xpack.Eql Eql { get; init; }
62+
63+
[JsonInclude]
64+
[JsonPropertyName("flattened")]
65+
public Elastic.Clients.Elasticsearch.Xpack.Flattened? Flattened { get; init; }
66+
67+
[JsonInclude]
68+
[JsonPropertyName("frozen_indices")]
69+
public Elastic.Clients.Elasticsearch.Xpack.FrozenIndices FrozenIndices { get; init; }
70+
71+
[JsonInclude]
72+
[JsonPropertyName("graph")]
73+
public Elastic.Clients.Elasticsearch.Xpack.Base Graph { get; init; }
74+
75+
[JsonInclude]
76+
[JsonPropertyName("ilm")]
77+
public Elastic.Clients.Elasticsearch.Xpack.Ilm Ilm { get; init; }
78+
79+
[JsonInclude]
80+
[JsonPropertyName("logstash")]
81+
public Elastic.Clients.Elasticsearch.Xpack.Base Logstash { get; init; }
82+
83+
[JsonInclude]
84+
[JsonPropertyName("ml")]
85+
public Elastic.Clients.Elasticsearch.Xpack.MachineLearning Ml { get; init; }
86+
87+
[JsonInclude]
88+
[JsonPropertyName("monitoring")]
89+
public Elastic.Clients.Elasticsearch.Xpack.Monitoring Monitoring { get; init; }
90+
91+
[JsonInclude]
92+
[JsonPropertyName("rollup")]
93+
public Elastic.Clients.Elasticsearch.Xpack.Base Rollup { get; init; }
94+
95+
[JsonInclude]
96+
[JsonPropertyName("runtime_fields")]
97+
public Elastic.Clients.Elasticsearch.Xpack.RuntimeFieldTypes? RuntimeFields { get; init; }
98+
99+
[JsonInclude]
100+
[JsonPropertyName("searchable_snapshots")]
101+
public Elastic.Clients.Elasticsearch.Xpack.SearchableSnapshots SearchableSnapshots { get; init; }
102+
103+
[JsonInclude]
104+
[JsonPropertyName("security")]
105+
public Elastic.Clients.Elasticsearch.Xpack.Security Security { get; init; }
106+
107+
[JsonInclude]
108+
[JsonPropertyName("slm")]
109+
public Elastic.Clients.Elasticsearch.Xpack.Slm Slm { get; init; }
110+
111+
[JsonInclude]
112+
[JsonPropertyName("spatial")]
113+
public Elastic.Clients.Elasticsearch.Xpack.Base Spatial { get; init; }
114+
115+
[JsonInclude]
116+
[JsonPropertyName("sql")]
117+
public Elastic.Clients.Elasticsearch.Xpack.Sql Sql { get; init; }
118+
119+
[JsonInclude]
120+
[JsonPropertyName("transform")]
121+
public Elastic.Clients.Elasticsearch.Xpack.Base Transform { get; init; }
122+
123+
[JsonInclude]
124+
[JsonPropertyName("vectors")]
125+
public Elastic.Clients.Elasticsearch.Xpack.Vector? Vectors { get; init; }
126+
127+
[JsonInclude]
128+
[JsonPropertyName("voting_only")]
129+
public Elastic.Clients.Elasticsearch.Xpack.Base VotingOnly { get; init; }
130+
131+
[JsonInclude]
132+
[JsonPropertyName("watcher")]
133+
public Elastic.Clients.Elasticsearch.Xpack.Watcher Watcher { get; init; }
134+
}
135+
}

0 commit comments

Comments
 (0)