diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index 7dc66b5f77f..8c6536f88c4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -71,6 +71,15 @@ internal static class ApiUrlsLookups internal static ApiUrls SearchableSnapshotsMount = new ApiUrls(new[] { "/_snapshot/{repository}/{snapshot}/_mount" }); internal static ApiUrls SearchableSnapshotsStats = new ApiUrls(new[] { "/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats" }); internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "/_search", "/{index}/_search" }); + internal static ApiUrls SnapshotLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}" }); + internal static ApiUrls SnapshotLifecycleManagementExecuteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}/_execute" }); + internal static ApiUrls SnapshotLifecycleManagementExecuteRetention = new ApiUrls(new[] { "/_slm/_execute_retention" }); + internal static ApiUrls SnapshotLifecycleManagementGetLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}", "/_slm/policy" }); + internal static ApiUrls SnapshotLifecycleManagementGetStats = new ApiUrls(new[] { "/_slm/stats" }); + internal static ApiUrls SnapshotLifecycleManagementGetStatus = new ApiUrls(new[] { "/_slm/status" }); + internal static ApiUrls SnapshotLifecycleManagementPutLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}" }); + internal static ApiUrls SnapshotLifecycleManagementStart = new ApiUrls(new[] { "/_slm/start" }); + internal static ApiUrls SnapshotLifecycleManagementStop = new ApiUrls(new[] { "/_slm/stop" }); internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "/{index}/_source/{id}" }); internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "/_sql/close" }); internal static ApiUrls SqlDeleteAsync = new ApiUrls(new[] { "/_sql/async/delete/{id}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleRequest.g.cs new file mode 100644 index 00000000000..f3adb4063af --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleRequest.g.cs @@ -0,0 +1,67 @@ +// 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.Slm +{ + public class SlmDeleteLifecycleRequestParameters : RequestParameters + { + } + + public partial class SlmDeleteLifecycleRequest : PlainRequestBase + { + public SlmDeleteLifecycleRequest(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementDeleteLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmDeleteLifecycleRequestDescriptor : RequestDescriptorBase + { + internal SlmDeleteLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmDeleteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal SlmDeleteLifecycleRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementDeleteLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + public SlmDeleteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Name policy_id) + { + RouteValues.Required("policy_id", policy_id); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleResponse.g.cs new file mode 100644 index 00000000000..25f04f90b6c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmDeleteLifecycleResponse.g.cs @@ -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.Slm +{ + public partial class SlmDeleteLifecycleResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleRequest.g.cs new file mode 100644 index 00000000000..5a11a85e763 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleRequest.g.cs @@ -0,0 +1,67 @@ +// 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.Slm +{ + public class SlmExecuteLifecycleRequestParameters : RequestParameters + { + } + + public partial class SlmExecuteLifecycleRequest : PlainRequestBase + { + public SlmExecuteLifecycleRequest(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementExecuteLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmExecuteLifecycleRequestDescriptor : RequestDescriptorBase + { + internal SlmExecuteLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmExecuteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal SlmExecuteLifecycleRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementExecuteLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + public SlmExecuteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Name policy_id) + { + RouteValues.Required("policy_id", policy_id); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleResponse.g.cs new file mode 100644 index 00000000000..a1a91176014 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteLifecycleResponse.g.cs @@ -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.Slm +{ + public partial class SlmExecuteLifecycleResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("snapshot_name")] + public string SnapshotName { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionRequest.g.cs new file mode 100644 index 00000000000..75efe4524a6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionRequest.g.cs @@ -0,0 +1,53 @@ +// 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.Slm +{ + public class SlmExecuteRetentionRequestParameters : RequestParameters + { + } + + public partial class SlmExecuteRetentionRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementExecuteRetention; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmExecuteRetentionRequestDescriptor : RequestDescriptorBase + { + internal SlmExecuteRetentionRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmExecuteRetentionRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementExecuteRetention; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionResponse.g.cs new file mode 100644 index 00000000000..1548e666b9b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmExecuteRetentionResponse.g.cs @@ -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.Slm +{ + public partial class SlmExecuteRetentionResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleRequest.g.cs new file mode 100644 index 00000000000..f9c4f8b5a5b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleRequest.g.cs @@ -0,0 +1,67 @@ +// 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.Slm +{ + public class SlmGetLifecycleRequestParameters : RequestParameters + { + } + + public partial class SlmGetLifecycleRequest : PlainRequestBase + { + public SlmGetLifecycleRequest() + { + } + + public SlmGetLifecycleRequest(Elastic.Clients.Elasticsearch.Names? policy_id) : base(r => r.Optional("policy_id", policy_id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmGetLifecycleRequestDescriptor : RequestDescriptorBase + { + internal SlmGetLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmGetLifecycleRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public SlmGetLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Names? policy_id) + { + RouteValues.Optional("policy_id", policy_id); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleResponse.g.cs new file mode 100644 index 00000000000..edb635dc53f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetLifecycleResponse.g.cs @@ -0,0 +1,28 @@ +// 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.Slm +{ + public partial class SlmGetLifecycleResponse : ElasticsearchResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsRequest.g.cs new file mode 100644 index 00000000000..d5e3620aa40 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsRequest.g.cs @@ -0,0 +1,53 @@ +// 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.Slm +{ + public class SlmGetStatsRequestParameters : RequestParameters + { + } + + public partial class SlmGetStatsRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmGetStatsRequestDescriptor : RequestDescriptorBase + { + internal SlmGetStatsRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmGetStatsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsResponse.g.cs new file mode 100644 index 00000000000..ad749b87b60 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatsResponse.g.cs @@ -0,0 +1,67 @@ +// 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.Slm +{ + public partial class SlmGetStatsResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("policy_stats")] + public IReadOnlyCollection PolicyStats { get; init; } + + [JsonInclude] + [JsonPropertyName("retention_deletion_time")] + public string RetentionDeletionTime { get; init; } + + [JsonInclude] + [JsonPropertyName("retention_deletion_time_millis")] + public Elastic.Clients.Elasticsearch.EpochMillis RetentionDeletionTimeMillis { get; init; } + + [JsonInclude] + [JsonPropertyName("retention_failed")] + public long RetentionFailed { get; init; } + + [JsonInclude] + [JsonPropertyName("retention_runs")] + public long RetentionRuns { get; init; } + + [JsonInclude] + [JsonPropertyName("retention_timed_out")] + public long RetentionTimedOut { get; init; } + + [JsonInclude] + [JsonPropertyName("total_snapshot_deletion_failures")] + public long TotalSnapshotDeletionFailures { get; init; } + + [JsonInclude] + [JsonPropertyName("total_snapshots_deleted")] + public long TotalSnapshotsDeleted { get; init; } + + [JsonInclude] + [JsonPropertyName("total_snapshots_failed")] + public long TotalSnapshotsFailed { get; init; } + + [JsonInclude] + [JsonPropertyName("total_snapshots_taken")] + public long TotalSnapshotsTaken { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusRequest.g.cs new file mode 100644 index 00000000000..547f0c392e3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusRequest.g.cs @@ -0,0 +1,53 @@ +// 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.Slm +{ + public class SlmGetStatusRequestParameters : RequestParameters + { + } + + public partial class SlmGetStatusRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetStatus; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmGetStatusRequestDescriptor : RequestDescriptorBase + { + internal SlmGetStatusRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmGetStatusRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementGetStatus; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusResponse.g.cs new file mode 100644 index 00000000000..f0856a3dbfb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmGetStatusResponse.g.cs @@ -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.Slm +{ + public partial class SlmGetStatusResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("operation_mode")] + public Elastic.Clients.Elasticsearch.LifecycleOperationMode OperationMode { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleRequest.g.cs new file mode 100644 index 00000000000..77029a4cbc9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleRequest.g.cs @@ -0,0 +1,235 @@ +// 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.Slm +{ + public class SlmPutLifecycleRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + } + + public partial class SlmPutLifecycleRequest : PlainRequestBase + { + public SlmPutLifecycleRequest(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementPutLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonInclude] + [JsonPropertyName("config")] + public Elastic.Clients.Elasticsearch.Slm.Configuration? Config { get; set; } + + [JsonInclude] + [JsonPropertyName("name")] + public Elastic.Clients.Elasticsearch.Name? Name { get; set; } + + [JsonInclude] + [JsonPropertyName("repository")] + public string? Repository { get; set; } + + [JsonInclude] + [JsonPropertyName("retention")] + public Elastic.Clients.Elasticsearch.Slm.Retention? Retention { get; set; } + + [JsonInclude] + [JsonPropertyName("schedule")] + public string? Schedule { get; set; } + } + + public sealed partial class SlmPutLifecycleRequestDescriptor : RequestDescriptorBase + { + internal SlmPutLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmPutLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Name policy_id) : base(r => r.Required("policy_id", policy_id)) + { + } + + internal SlmPutLifecycleRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementPutLifecycle; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public SlmPutLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public SlmPutLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public SlmPutLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Name policy_id) + { + RouteValues.Required("policy_id", policy_id); + return Self; + } + + private Elastic.Clients.Elasticsearch.Slm.Configuration? ConfigValue { get; set; } + + private ConfigurationDescriptor ConfigDescriptor { get; set; } + + private Action ConfigDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } + + private string? RepositoryValue { get; set; } + + private Elastic.Clients.Elasticsearch.Slm.Retention? RetentionValue { get; set; } + + private RetentionDescriptor RetentionDescriptor { get; set; } + + private Action RetentionDescriptorAction { get; set; } + + private string? ScheduleValue { get; set; } + + public SlmPutLifecycleRequestDescriptor Config(Elastic.Clients.Elasticsearch.Slm.Configuration? config) + { + ConfigDescriptor = null; + ConfigDescriptorAction = null; + ConfigValue = config; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Config(Slm.ConfigurationDescriptor descriptor) + { + ConfigValue = null; + ConfigDescriptorAction = null; + ConfigDescriptor = descriptor; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Config(Action configure) + { + ConfigValue = null; + ConfigDescriptorAction = null; + ConfigDescriptorAction = configure; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) + { + NameValue = name; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Repository(string? repository) + { + RepositoryValue = repository; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Retention(Elastic.Clients.Elasticsearch.Slm.Retention? retention) + { + RetentionDescriptor = null; + RetentionDescriptorAction = null; + RetentionValue = retention; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Retention(Slm.RetentionDescriptor descriptor) + { + RetentionValue = null; + RetentionDescriptorAction = null; + RetentionDescriptor = descriptor; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Retention(Action configure) + { + RetentionValue = null; + RetentionDescriptorAction = null; + RetentionDescriptorAction = configure; + return Self; + } + + public SlmPutLifecycleRequestDescriptor Schedule(string? schedule) + { + ScheduleValue = schedule; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ConfigDescriptor is not null) + { + writer.WritePropertyName("config"); + JsonSerializer.Serialize(writer, ConfigDescriptor, options); + } + else if (ConfigDescriptorAction is not null) + { + writer.WritePropertyName("config"); + JsonSerializer.Serialize(writer, new Slm.ConfigurationDescriptor(ConfigDescriptorAction), options); + } + else if (ConfigValue is not null) + { + writer.WritePropertyName("config"); + JsonSerializer.Serialize(writer, ConfigValue, options); + } + + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + + if (!string.IsNullOrEmpty(RepositoryValue)) + { + writer.WritePropertyName("repository"); + writer.WriteStringValue(RepositoryValue); + } + + if (RetentionDescriptor is not null) + { + writer.WritePropertyName("retention"); + JsonSerializer.Serialize(writer, RetentionDescriptor, options); + } + else if (RetentionDescriptorAction is not null) + { + writer.WritePropertyName("retention"); + JsonSerializer.Serialize(writer, new Slm.RetentionDescriptor(RetentionDescriptorAction), options); + } + else if (RetentionValue is not null) + { + writer.WritePropertyName("retention"); + JsonSerializer.Serialize(writer, RetentionValue, options); + } + + if (ScheduleValue is not null) + { + writer.WritePropertyName("schedule"); + JsonSerializer.Serialize(writer, ScheduleValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleResponse.g.cs new file mode 100644 index 00000000000..af4130dab12 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmPutLifecycleResponse.g.cs @@ -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.Slm +{ + public partial class SlmPutLifecycleResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartRequest.g.cs new file mode 100644 index 00000000000..8d3a6bc5c6d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartRequest.g.cs @@ -0,0 +1,53 @@ +// 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.Slm +{ + public class SlmStartRequestParameters : RequestParameters + { + } + + public partial class SlmStartRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementStart; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmStartRequestDescriptor : RequestDescriptorBase + { + internal SlmStartRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmStartRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementStart; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartResponse.g.cs new file mode 100644 index 00000000000..9850886c0df --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStartResponse.g.cs @@ -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.Slm +{ + public partial class SlmStartResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopRequest.g.cs new file mode 100644 index 00000000000..946e95c0daa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopRequest.g.cs @@ -0,0 +1,53 @@ +// 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.Slm +{ + public class SlmStopRequestParameters : RequestParameters + { + } + + public partial class SlmStopRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementStop; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + } + + public sealed partial class SlmStopRequestDescriptor : RequestDescriptorBase + { + internal SlmStopRequestDescriptor(Action configure) => configure.Invoke(this); + public SlmStopRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotLifecycleManagementStop; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopResponse.g.cs new file mode 100644 index 00000000000..4f0fb1b45f3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Slm/SlmStopResponse.g.cs @@ -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.Slm +{ + public partial class SlmStopResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs new file mode 100644 index 00000000000..08220cdc3b7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs @@ -0,0 +1,283 @@ +// 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 System; +using System.Threading; +using System.Threading.Tasks; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Slm +{ + public class SlmNamespace : NamespacedClientProxy + { + internal SlmNamespace(ElasticsearchClient client) : base(client) + { + } + + public SlmDeleteLifecycleResponse DeleteLifecycle(SlmDeleteLifecycleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task DeleteLifecycleAsync(SlmDeleteLifecycleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmDeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null) + { + var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmExecuteLifecycleResponse ExecuteLifecycle(SlmExecuteLifecycleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ExecuteLifecycleAsync(SlmExecuteLifecycleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null) + { + var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmExecuteRetentionResponse ExecuteRetention(SlmExecuteRetentionRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ExecuteRetentionAsync(SlmExecuteRetentionRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmExecuteRetentionResponse ExecuteRetention(Action configureRequest = null) + { + var descriptor = new SlmExecuteRetentionRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ExecuteRetentionAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmExecuteRetentionRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmGetLifecycleResponse GetLifecycle(SlmGetLifecycleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task GetLifecycleAsync(SlmGetLifecycleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmGetLifecycleResponse GetLifecycle(Action configureRequest = null) + { + var descriptor = new SlmGetLifecycleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task GetLifecycleAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmGetLifecycleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmGetStatsResponse GetStats(SlmGetStatsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task GetStatsAsync(SlmGetStatsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmGetStatsResponse GetStats(Action configureRequest = null) + { + var descriptor = new SlmGetStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task GetStatsAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmGetStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmGetStatusResponse GetStatus(SlmGetStatusRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task GetStatusAsync(SlmGetStatusRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmGetStatusResponse GetStatus(Action configureRequest = null) + { + var descriptor = new SlmGetStatusRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task GetStatusAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmGetStatusRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmPutLifecycleResponse PutLifecycle(SlmPutLifecycleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task PutLifecycleAsync(SlmPutLifecycleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmPutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null) + { + var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task PutLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmStartResponse Start(SlmStartRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task StartAsync(SlmStartRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmStartResponse Start(Action configureRequest = null) + { + var descriptor = new SlmStartRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task StartAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmStartRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SlmStopResponse Stop(SlmStopRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task StopAsync(SlmStopRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SlmStopResponse Stop(Action configureRequest = null) + { + var descriptor = new SlmStopRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task StopAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SlmStopRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 64fbf8b7fe7..cb1f120cdfa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -24,6 +24,7 @@ using Elastic.Clients.Elasticsearch.IndexManagement; using Elastic.Clients.Elasticsearch.Nodes; using Elastic.Clients.Elasticsearch.SearchableSnapshots; +using Elastic.Clients.Elasticsearch.Slm; using Elastic.Clients.Elasticsearch.Sql; using Elastic.Clients.Elasticsearch.Tasks; using System; @@ -53,6 +54,8 @@ public partial class ElasticsearchClient public SearchableSnapshotsNamespace SearchableSnapshots { get; private set; } + public SlmNamespace Slm { get; private set; } + public SqlNamespace Sql { get; private set; } public TasksNamespace Tasks { get; private set; } @@ -68,6 +71,7 @@ private partial void SetupNamespaces() IndexManagement = new IndexManagementNamespace(this); Nodes = new NodesNamespace(this); SearchableSnapshots = new SearchableSnapshotsNamespace(this); + Slm = new SlmNamespace(this); Sql = new SqlNamespace(this); Tasks = new TasksNamespace(this); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Configuration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Configuration.g.cs new file mode 100644 index 00000000000..916b62c9f40 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Configuration.g.cs @@ -0,0 +1,147 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Slm +{ + public partial class Configuration + { + [JsonInclude] + [JsonPropertyName("feature_states")] + public IEnumerable? FeatureStates { get; set; } + + [JsonInclude] + [JsonPropertyName("ignore_unavailable")] + public bool? IgnoreUnavailable { get; set; } + + [JsonInclude] + [JsonPropertyName("include_global_state")] + public bool? IncludeGlobalState { get; set; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices Indices { get; set; } + + [JsonInclude] + [JsonPropertyName("metadata")] + public Dictionary? Metadata { get; set; } + + [JsonInclude] + [JsonPropertyName("partial")] + public bool? Partial { get; set; } + } + + public sealed partial class ConfigurationDescriptor : DescriptorBase + { + internal ConfigurationDescriptor(Action configure) => configure.Invoke(this); + public ConfigurationDescriptor() : base() + { + } + + private IEnumerable? FeatureStatesValue { get; set; } + + private bool? IgnoreUnavailableValue { get; set; } + + private bool? IncludeGlobalStateValue { get; set; } + + private Elastic.Clients.Elasticsearch.Indices IndicesValue { get; set; } + + private Dictionary? MetadataValue { get; set; } + + private bool? PartialValue { get; set; } + + public ConfigurationDescriptor FeatureStates(IEnumerable? featureStates) + { + FeatureStatesValue = featureStates; + return Self; + } + + public ConfigurationDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) + { + IgnoreUnavailableValue = ignoreUnavailable; + return Self; + } + + public ConfigurationDescriptor IncludeGlobalState(bool? includeGlobalState = true) + { + IncludeGlobalStateValue = includeGlobalState; + return Self; + } + + public ConfigurationDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + IndicesValue = indices; + return Self; + } + + public ConfigurationDescriptor Metadata(Func, FluentDictionary> selector) + { + MetadataValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ConfigurationDescriptor Partial(bool? partial = true) + { + PartialValue = partial; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FeatureStatesValue is not null) + { + writer.WritePropertyName("feature_states"); + JsonSerializer.Serialize(writer, FeatureStatesValue, options); + } + + if (IgnoreUnavailableValue.HasValue) + { + writer.WritePropertyName("ignore_unavailable"); + writer.WriteBooleanValue(IgnoreUnavailableValue.Value); + } + + if (IncludeGlobalStateValue.HasValue) + { + writer.WritePropertyName("include_global_state"); + writer.WriteBooleanValue(IncludeGlobalStateValue.Value); + } + + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + if (MetadataValue is not null) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, MetadataValue, options); + } + + if (PartialValue.HasValue) + { + writer.WritePropertyName("partial"); + writer.WriteBooleanValue(PartialValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Retention.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Retention.g.cs new file mode 100644 index 00000000000..9f9f008dccf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Slm/Retention.g.cs @@ -0,0 +1,85 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Slm +{ + public partial class Retention + { + [JsonInclude] + [JsonPropertyName("expire_after")] + public Elastic.Clients.Elasticsearch.Time ExpireAfter { get; set; } + + [JsonInclude] + [JsonPropertyName("max_count")] + public int MaxCount { get; set; } + + [JsonInclude] + [JsonPropertyName("min_count")] + public int MinCount { get; set; } + } + + public sealed partial class RetentionDescriptor : DescriptorBase + { + internal RetentionDescriptor(Action configure) => configure.Invoke(this); + public RetentionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Time ExpireAfterValue { get; set; } + + private int MaxCountValue { get; set; } + + private int MinCountValue { get; set; } + + public RetentionDescriptor ExpireAfter(Elastic.Clients.Elasticsearch.Time expireAfter) + { + ExpireAfterValue = expireAfter; + return Self; + } + + public RetentionDescriptor MaxCount(int maxCount) + { + MaxCountValue = maxCount; + return Self; + } + + public RetentionDescriptor MinCount(int minCount) + { + MinCountValue = minCount; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("expire_after"); + JsonSerializer.Serialize(writer, ExpireAfterValue, options); + writer.WritePropertyName("max_count"); + writer.WriteNumberValue(MaxCountValue); + writer.WritePropertyName("min_count"); + writer.WriteNumberValue(MinCountValue); + writer.WriteEndObject(); + } + } +} \ No newline at end of file