Skip to content

Add Transform APIs #6326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@ internal static class ApiUrlsLookups
internal static ApiUrls TasksCancel = new ApiUrls(new[] { "/_tasks/_cancel", "/_tasks/{task_id}/_cancel" });
internal static ApiUrls TasksList = new ApiUrls(new[] { "/_tasks" });
internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "/{index}/_terms_enum" });
internal static ApiUrls TransformManagementDeleteTransform = new ApiUrls(new[] { "/_transform/{transform_id}" });
internal static ApiUrls TransformManagementGetTransform = new ApiUrls(new[] { "/_transform/{transform_id}", "/_transform" });
internal static ApiUrls TransformManagementGetTransformStats = new ApiUrls(new[] { "/_transform/{transform_id}/_stats" });
internal static ApiUrls TransformManagementPreviewTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_preview", "/_transform/_preview" });
internal static ApiUrls TransformManagementPutTransform = new ApiUrls(new[] { "/_transform/{transform_id}" });
internal static ApiUrls TransformManagementStartTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_start" });
internal static ApiUrls TransformManagementStopTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_stop" });
internal static ApiUrls TransformManagementUpdateTransform = new ApiUrls(new[] { "/_transform/{transform_id}/_update" });
internal static ApiUrls TransformManagementUpgradeTransforms = new ApiUrls(new[] { "/_transform/_upgrade" });
internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "/{index}/_update_by_query" });
internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "/_update_by_query/{task_id}/_rethrottle" });
internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "/{index}/_update/{id}" });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public class TransformDeleteTransformRequestParameters : RequestParameters<TransformDeleteTransformRequestParameters>
{
[JsonIgnore]
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }

[JsonIgnore]
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
}

public partial class TransformDeleteTransformRequest : PlainRequestBase<TransformDeleteTransformRequestParameters>
{
public TransformDeleteTransformRequest(Elastic.Clients.Elasticsearch.Id transform_id) : base(r => r.Required("transform_id", transform_id))
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementDeleteTransform;
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
protected override bool SupportsBody => false;
[JsonIgnore]
public bool? Force { get => Q<bool?>("force"); set => Q("force", value); }

[JsonIgnore]
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
}

public sealed partial class TransformDeleteTransformRequestDescriptor : RequestDescriptorBase<TransformDeleteTransformRequestDescriptor, TransformDeleteTransformRequestParameters>
{
internal TransformDeleteTransformRequestDescriptor(Action<TransformDeleteTransformRequestDescriptor> configure) => configure.Invoke(this);
public TransformDeleteTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Id transform_id) : base(r => r.Required("transform_id", transform_id))
{
}

internal TransformDeleteTransformRequestDescriptor()
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementDeleteTransform;
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
protected override bool SupportsBody => false;
public TransformDeleteTransformRequestDescriptor Force(bool? force = true) => Qs("force", force);
public TransformDeleteTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
public TransformDeleteTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Id transform_id)
{
RouteValues.Required("transform_id", transform_id);
return Self;
}

protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport.Products.Elasticsearch;
using System.Collections.Generic;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public partial class TransformDeleteTransformResponse : ElasticsearchResponseBase
{
[JsonInclude]
[JsonPropertyName("acknowledged")]
public bool Acknowledged { get; init; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public class TransformGetTransformRequestParameters : RequestParameters<TransformGetTransformRequestParameters>
{
[JsonIgnore]
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

[JsonIgnore]
public int? From { get => Q<int?>("from"); set => Q("from", value); }

[JsonIgnore]
public int? Size { get => Q<int?>("size"); set => Q("size", value); }

[JsonIgnore]
public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }
}

public partial class TransformGetTransformRequest : PlainRequestBase<TransformGetTransformRequestParameters>
{
public TransformGetTransformRequest()
{
}

public TransformGetTransformRequest(Elastic.Clients.Elasticsearch.Names? transform_id) : base(r => r.Optional("transform_id", transform_id))
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransform;
protected override HttpMethod HttpMethod => HttpMethod.GET;
protected override bool SupportsBody => false;
[JsonIgnore]
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

[JsonIgnore]
public int? From { get => Q<int?>("from"); set => Q("from", value); }

[JsonIgnore]
public int? Size { get => Q<int?>("size"); set => Q("size", value); }

[JsonIgnore]
public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }
}

public sealed partial class TransformGetTransformRequestDescriptor : RequestDescriptorBase<TransformGetTransformRequestDescriptor, TransformGetTransformRequestParameters>
{
internal TransformGetTransformRequestDescriptor(Action<TransformGetTransformRequestDescriptor> configure) => configure.Invoke(this);
public TransformGetTransformRequestDescriptor()
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransform;
protected override HttpMethod HttpMethod => HttpMethod.GET;
protected override bool SupportsBody => false;
public TransformGetTransformRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
public TransformGetTransformRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated);
public TransformGetTransformRequestDescriptor From(int? from) => Qs("from", from);
public TransformGetTransformRequestDescriptor Size(int? size) => Qs("size", size);
public TransformGetTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Names? transform_id)
{
RouteValues.Optional("transform_id", transform_id);
return Self;
}

protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport.Products.Elasticsearch;
using System.Collections.Generic;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public partial class TransformGetTransformResponse : ElasticsearchResponseBase
{
[JsonInclude]
[JsonPropertyName("count")]
public long Count { get; init; }

[JsonInclude]
[JsonPropertyName("transforms")]
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.TransformManagement.TransformSummary> Transforms { get; init; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public class TransformGetTransformStatsRequestParameters : RequestParameters<TransformGetTransformStatsRequestParameters>
{
[JsonIgnore]
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

[JsonIgnore]
public long? From { get => Q<long?>("from"); set => Q("from", value); }

[JsonIgnore]
public long? Size { get => Q<long?>("size"); set => Q("size", value); }
}

public partial class TransformGetTransformStatsRequest : PlainRequestBase<TransformGetTransformStatsRequestParameters>
{
public TransformGetTransformStatsRequest(Elastic.Clients.Elasticsearch.Names transform_id) : base(r => r.Required("transform_id", transform_id))
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransformStats;
protected override HttpMethod HttpMethod => HttpMethod.GET;
protected override bool SupportsBody => false;
[JsonIgnore]
public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

[JsonIgnore]
public long? From { get => Q<long?>("from"); set => Q("from", value); }

[JsonIgnore]
public long? Size { get => Q<long?>("size"); set => Q("size", value); }
}

public sealed partial class TransformGetTransformStatsRequestDescriptor : RequestDescriptorBase<TransformGetTransformStatsRequestDescriptor, TransformGetTransformStatsRequestParameters>
{
internal TransformGetTransformStatsRequestDescriptor(Action<TransformGetTransformStatsRequestDescriptor> configure) => configure.Invoke(this);
public TransformGetTransformStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Names transform_id) : base(r => r.Required("transform_id", transform_id))
{
}

internal TransformGetTransformStatsRequestDescriptor()
{
}

internal override ApiUrls ApiUrls => ApiUrlsLookups.TransformManagementGetTransformStats;
protected override HttpMethod HttpMethod => HttpMethod.GET;
protected override bool SupportsBody => false;
public TransformGetTransformStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
public TransformGetTransformStatsRequestDescriptor From(long? from) => Qs("from", from);
public TransformGetTransformStatsRequestDescriptor Size(long? size) => Qs("size", size);
public TransformGetTransformStatsRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Names transform_id)
{
RouteValues.Required("transform_id", transform_id);
return Self;
}

protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport.Products.Elasticsearch;
using System.Collections.Generic;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.TransformManagement
{
public partial class TransformGetTransformStatsResponse : ElasticsearchResponseBase
{
[JsonInclude]
[JsonPropertyName("count")]
public long Count { get; init; }

[JsonInclude]
[JsonPropertyName("transforms")]
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.TransformManagement.TransformStats> Transforms { get; init; }
}
}
Loading