Skip to content

Commit 450adfb

Browse files
Add Transform APIs (#6326) (#6327)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent fc9c994 commit 450adfb

36 files changed

+5201
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ internal static class ApiUrlsLookups
208208
internal static ApiUrls TasksCancel = new ApiUrls(new[] { "/_tasks/_cancel", "/_tasks/{task_id}/_cancel" });
209209
internal static ApiUrls TasksList = new ApiUrls(new[] { "/_tasks" });
210210
internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "/{index}/_terms_enum" });
211+
internal static ApiUrls TransformManagementDeleteTransform = new ApiUrls(new[] { "/_transform/{transform_id}" });
212+
internal static ApiUrls TransformManagementGetTransform = new ApiUrls(new[] { "/_transform/{transform_id}", "/_transform" });
213+
internal static ApiUrls TransformManagementGetTransformStats = new ApiUrls(new[] { "/_transform/{transform_id}/_stats" });
214+
internal static ApiUrls TransformManagementPreviewTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_preview", "/_transform/_preview" });
215+
internal static ApiUrls TransformManagementPutTransform = new ApiUrls(new[] { "/_transform/{transform_id}" });
216+
internal static ApiUrls TransformManagementStartTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_start" });
217+
internal static ApiUrls TransformManagementStopTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_stop" });
218+
internal static ApiUrls TransformManagementUpdateTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_update" });
219+
internal static ApiUrls TransformManagementUpgradeTransforms = new ApiUrls(new[] { "/_transform/_upgrade" });
211220
internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "/{index}/_update_by_query" });
212221
internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "/_update_by_query/{task_id}/_rethrottle" });
213222
internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "/{index}/_update/{id}" });
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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.TransformManagement
27+
{
28+
public class TransformDeleteTransformRequestParameters : RequestParameters<TransformDeleteTransformRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }
32+
33+
[JsonIgnore]
34+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
35+
}
36+
37+
public partial class TransformDeleteTransformRequest : PlainRequestBase<TransformDeleteTransformRequestParameters>
38+
{
39+
public TransformDeleteTransformRequest(Elastic.Clients.Elasticsearch.Id transform_id) : base(r => r.Required("transform_id", transform_id))
40+
{
41+
}
42+
43+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementDeleteTransform;
44+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
45+
protected override bool SupportsBody => false;
46+
[JsonIgnore]
47+
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }
48+
49+
[JsonIgnore]
50+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
51+
}
52+
53+
public sealed partial class TransformDeleteTransformRequestDescriptor : RequestDescriptorBase<TransformDeleteTransformRequestDescriptor, TransformDeleteTransformRequestParameters>
54+
{
55+
internal TransformDeleteTransformRequestDescriptor(Action<TransformDeleteTransformRequestDescriptor> configure) => configure.Invoke(this);
56+
public TransformDeleteTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Id transform_id) : base(r => r.Required("transform_id", transform_id))
57+
{
58+
}
59+
60+
internal TransformDeleteTransformRequestDescriptor()
61+
{
62+
}
63+
64+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementDeleteTransform;
65+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
66+
protected override bool SupportsBody => false;
67+
public TransformDeleteTransformRequestDescriptor Force(bool? force = true) => Qs("force", force);
68+
public TransformDeleteTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
69+
public TransformDeleteTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Id transform_id)
70+
{
71+
RouteValues.Required("transform_id", transform_id);
72+
return Self;
73+
}
74+
75+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
76+
{
77+
}
78+
}
79+
}
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.TransformManagement
24+
{
25+
public partial class TransformDeleteTransformResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("acknowledged")]
29+
public bool Acknowledged { get; init; }
30+
}
31+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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.TransformManagement
27+
{
28+
public class TransformGetTransformRequestParameters : RequestParameters<TransformGetTransformRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }
32+
33+
[JsonIgnore]
34+
public int? From { get => Q<int?>("from"); set => Q("from", value); }
35+
36+
[JsonIgnore]
37+
public int? Size { get => Q<int?>("size"); set => Q("size", value); }
38+
39+
[JsonIgnore]
40+
public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }
41+
}
42+
43+
public partial class TransformGetTransformRequest : PlainRequestBase<TransformGetTransformRequestParameters>
44+
{
45+
public TransformGetTransformRequest()
46+
{
47+
}
48+
49+
public TransformGetTransformRequest(Elastic.Clients.Elasticsearch.Names? transform_id) : base(r => r.Optional("transform_id", transform_id))
50+
{
51+
}
52+
53+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransform;
54+
protected override HttpMethod HttpMethod => HttpMethod.GET;
55+
protected override bool SupportsBody => false;
56+
[JsonIgnore]
57+
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }
58+
59+
[JsonIgnore]
60+
public int? From { get => Q<int?>("from"); set => Q("from", value); }
61+
62+
[JsonIgnore]
63+
public int? Size { get => Q<int?>("size"); set => Q("size", value); }
64+
65+
[JsonIgnore]
66+
public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }
67+
}
68+
69+
public sealed partial class TransformGetTransformRequestDescriptor : RequestDescriptorBase<TransformGetTransformRequestDescriptor, TransformGetTransformRequestParameters>
70+
{
71+
internal TransformGetTransformRequestDescriptor(Action<TransformGetTransformRequestDescriptor> configure) => configure.Invoke(this);
72+
public TransformGetTransformRequestDescriptor()
73+
{
74+
}
75+
76+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransform;
77+
protected override HttpMethod HttpMethod => HttpMethod.GET;
78+
protected override bool SupportsBody => false;
79+
public TransformGetTransformRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
80+
public TransformGetTransformRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated);
81+
public TransformGetTransformRequestDescriptor From(int? from) => Qs("from", from);
82+
public TransformGetTransformRequestDescriptor Size(int? size) => Qs("size", size);
83+
public TransformGetTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Names? transform_id)
84+
{
85+
RouteValues.Optional("transform_id", transform_id);
86+
return Self;
87+
}
88+
89+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
90+
{
91+
}
92+
}
93+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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.TransformManagement
24+
{
25+
public partial class TransformGetTransformResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("count")]
29+
public long Count { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("transforms")]
33+
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.TransformManagement.TransformSummary> Transforms { get; init; }
34+
}
35+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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.TransformManagement
27+
{
28+
public class TransformGetTransformStatsRequestParameters : RequestParameters<TransformGetTransformStatsRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }
32+
33+
[JsonIgnore]
34+
public long? From { get => Q<long?>("from"); set => Q("from", value); }
35+
36+
[JsonIgnore]
37+
public long? Size { get => Q<long?>("size"); set => Q("size", value); }
38+
}
39+
40+
public partial class TransformGetTransformStatsRequest : PlainRequestBase<TransformGetTransformStatsRequestParameters>
41+
{
42+
public TransformGetTransformStatsRequest(Elastic.Clients.Elasticsearch.Names transform_id) : base(r => r.Required("transform_id", transform_id))
43+
{
44+
}
45+
46+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransformStats;
47+
protected override HttpMethod HttpMethod => HttpMethod.GET;
48+
protected override bool SupportsBody => false;
49+
[JsonIgnore]
50+
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }
51+
52+
[JsonIgnore]
53+
public long? From { get => Q<long?>("from"); set => Q("from", value); }
54+
55+
[JsonIgnore]
56+
public long? Size { get => Q<long?>("size"); set => Q("size", value); }
57+
}
58+
59+
public sealed partial class TransformGetTransformStatsRequestDescriptor : RequestDescriptorBase<TransformGetTransformStatsRequestDescriptor, TransformGetTransformStatsRequestParameters>
60+
{
61+
internal TransformGetTransformStatsRequestDescriptor(Action<TransformGetTransformStatsRequestDescriptor> configure) => configure.Invoke(this);
62+
public TransformGetTransformStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Names transform_id) : base(r => r.Required("transform_id", transform_id))
63+
{
64+
}
65+
66+
internal TransformGetTransformStatsRequestDescriptor()
67+
{
68+
}
69+
70+
internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransformStats;
71+
protected override HttpMethod HttpMethod => HttpMethod.GET;
72+
protected override bool SupportsBody => false;
73+
public TransformGetTransformStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
74+
public TransformGetTransformStatsRequestDescriptor From(long? from) => Qs("from", from);
75+
public TransformGetTransformStatsRequestDescriptor Size(long? size) => Qs("size", size);
76+
public TransformGetTransformStatsRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Names transform_id)
77+
{
78+
RouteValues.Required("transform_id", transform_id);
79+
return Self;
80+
}
81+
82+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
83+
{
84+
}
85+
}
86+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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.TransformManagement
24+
{
25+
public partial class TransformGetTransformStatsResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("count")]
29+
public long Count { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("transforms")]
33+
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.TransformManagement.TransformStats> Transforms { get; init; }
34+
}
35+
}

0 commit comments

Comments
 (0)