diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index f791e21e33b..4ecfad37faa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -23,6 +23,10 @@ internal static class ApiUrlsLookups internal static ApiUrls AsyncSearchSubmit = new ApiUrls(new[] { "/_async_search", "/{index}/_async_search" }); internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "/_async_search/{id}" }); internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "/_async_search/{id}" }); + internal static ApiUrls AutoscalingDeleteAutoscalingPolicy = new ApiUrls(new[] { "/_autoscaling/policy/{name}" }); + internal static ApiUrls AutoscalingGetAutoscalingCapacity = new ApiUrls(new[] { "/_autoscaling/capacity" }); + internal static ApiUrls AutoscalingGetAutoscalingPolicy = new ApiUrls(new[] { "/_autoscaling/policy/{name}" }); + internal static ApiUrls AutoscalingPutAutoscalingPolicy = new ApiUrls(new[] { "/_autoscaling/policy/{name}" }); internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "/_bulk", "/{index}/_bulk" }); internal static ApiUrls CrossClusterReplicationDeleteAutoFollowPattern = new ApiUrls(new[] { "/_ccr/auto_follow/{name}" }); internal static ApiUrls CrossClusterReplicationFollowInfo = new ApiUrls(new[] { "/{index}/_ccr/info" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingDeleteAutoscalingPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingDeleteAutoscalingPolicyRequest.g.cs new file mode 100644 index 00000000000..70d958d993f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingDeleteAutoscalingPolicyRequest.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.Autoscaling +{ + public class AutoscalingDeleteAutoscalingPolicyRequestParameters : RequestParameters + { + } + + public partial class AutoscalingDeleteAutoscalingPolicyRequest : PlainRequestBase + { + public AutoscalingDeleteAutoscalingPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingDeleteAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + } + + public sealed partial class AutoscalingDeleteAutoscalingPolicyRequestDescriptor : RequestDescriptorBase + { + internal AutoscalingDeleteAutoscalingPolicyRequestDescriptor(Action configure) => configure.Invoke(this); + public AutoscalingDeleteAutoscalingPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal AutoscalingDeleteAutoscalingPolicyRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingDeleteAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + public AutoscalingDeleteAutoscalingPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + 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/Autoscaling/AutoscalingDeleteAutoscalingPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingDeleteAutoscalingPolicyResponse.g.cs new file mode 100644 index 00000000000..b6f03144bf9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingDeleteAutoscalingPolicyResponse.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.Autoscaling +{ + public partial class AutoscalingDeleteAutoscalingPolicyResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingCapacityRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingCapacityRequest.g.cs new file mode 100644 index 00000000000..40c9355c79b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingCapacityRequest.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.Autoscaling +{ + public class AutoscalingGetAutoscalingCapacityRequestParameters : RequestParameters + { + } + + public partial class AutoscalingGetAutoscalingCapacityRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingGetAutoscalingCapacity; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class AutoscalingGetAutoscalingCapacityRequestDescriptor : RequestDescriptorBase + { + internal AutoscalingGetAutoscalingCapacityRequestDescriptor(Action configure) => configure.Invoke(this); + public AutoscalingGetAutoscalingCapacityRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingGetAutoscalingCapacity; + 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/Autoscaling/AutoscalingGetAutoscalingCapacityResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingCapacityResponse.g.cs new file mode 100644 index 00000000000..ce60983dfea --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingCapacityResponse.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.Autoscaling +{ + public partial class AutoscalingGetAutoscalingCapacityResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("policies")] + public Dictionary Policies { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingPolicyRequest.g.cs new file mode 100644 index 00000000000..5c5257011d0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingPolicyRequest.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.Autoscaling +{ + public class AutoscalingGetAutoscalingPolicyRequestParameters : RequestParameters + { + } + + public partial class AutoscalingGetAutoscalingPolicyRequest : PlainRequestBase + { + public AutoscalingGetAutoscalingPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingGetAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class AutoscalingGetAutoscalingPolicyRequestDescriptor : RequestDescriptorBase + { + internal AutoscalingGetAutoscalingPolicyRequestDescriptor(Action configure) => configure.Invoke(this); + public AutoscalingGetAutoscalingPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal AutoscalingGetAutoscalingPolicyRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingGetAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public AutoscalingGetAutoscalingPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + 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/Autoscaling/AutoscalingGetAutoscalingPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingPolicyResponse.g.cs new file mode 100644 index 00000000000..4291bdea8b0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingGetAutoscalingPolicyResponse.g.cs @@ -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.Autoscaling +{ + public partial class AutoscalingGetAutoscalingPolicyResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("deciders")] + public Dictionary Deciders { get; init; } + + [JsonInclude] + [JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingPutAutoscalingPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingPutAutoscalingPolicyRequest.g.cs new file mode 100644 index 00000000000..2cf5c42b392 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingPutAutoscalingPolicyRequest.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.Autoscaling +{ + public class AutoscalingPutAutoscalingPolicyRequestParameters : RequestParameters + { + } + + public partial class AutoscalingPutAutoscalingPolicyRequest : PlainRequestBase + { + public AutoscalingPutAutoscalingPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingPutAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + } + + public sealed partial class AutoscalingPutAutoscalingPolicyRequestDescriptor : RequestDescriptorBase + { + internal AutoscalingPutAutoscalingPolicyRequestDescriptor(Action configure) => configure.Invoke(this); + public AutoscalingPutAutoscalingPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal AutoscalingPutAutoscalingPolicyRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.AutoscalingPutAutoscalingPolicy; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + public AutoscalingPutAutoscalingPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + 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/Autoscaling/AutoscalingPutAutoscalingPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingPutAutoscalingPolicyResponse.g.cs new file mode 100644 index 00000000000..694970afa1c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Autoscaling/AutoscalingPutAutoscalingPolicyResponse.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.Autoscaling +{ + public partial class AutoscalingPutAutoscalingPolicyResponse : 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.Autoscaling.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Autoscaling.g.cs new file mode 100644 index 00000000000..3cdfab761fa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Autoscaling.g.cs @@ -0,0 +1,143 @@ +// 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.Autoscaling +{ + public class AutoscalingNamespace : NamespacedClientProxy + { + internal AutoscalingNamespace(ElasticsearchClient client) : base(client) + { + } + + public AutoscalingDeleteAutoscalingPolicyResponse DeleteAutoscalingPolicy(AutoscalingDeleteAutoscalingPolicyRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task DeleteAutoscalingPolicyAsync(AutoscalingDeleteAutoscalingPolicyRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public AutoscalingDeleteAutoscalingPolicyResponse DeleteAutoscalingPolicy(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null) + { + var descriptor = new AutoscalingDeleteAutoscalingPolicyRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task DeleteAutoscalingPolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new AutoscalingDeleteAutoscalingPolicyRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public AutoscalingGetAutoscalingCapacityResponse GetAutoscalingCapacity(AutoscalingGetAutoscalingCapacityRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task GetAutoscalingCapacityAsync(AutoscalingGetAutoscalingCapacityRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public AutoscalingGetAutoscalingCapacityResponse GetAutoscalingCapacity(Action configureRequest = null) + { + var descriptor = new AutoscalingGetAutoscalingCapacityRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task GetAutoscalingCapacityAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new AutoscalingGetAutoscalingCapacityRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public AutoscalingGetAutoscalingPolicyResponse GetAutoscalingPolicy(AutoscalingGetAutoscalingPolicyRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task GetAutoscalingPolicyAsync(AutoscalingGetAutoscalingPolicyRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public AutoscalingGetAutoscalingPolicyResponse GetAutoscalingPolicy(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null) + { + var descriptor = new AutoscalingGetAutoscalingPolicyRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task GetAutoscalingPolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new AutoscalingGetAutoscalingPolicyRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public AutoscalingPutAutoscalingPolicyResponse PutAutoscalingPolicy(AutoscalingPutAutoscalingPolicyRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task PutAutoscalingPolicyAsync(AutoscalingPutAutoscalingPolicyRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public AutoscalingPutAutoscalingPolicyResponse PutAutoscalingPolicy(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null) + { + var descriptor = new AutoscalingPutAutoscalingPolicyRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task PutAutoscalingPolicyAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new AutoscalingPutAutoscalingPolicyRequestDescriptor(name); + 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 afaf74a2a28..115d348b99b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -16,6 +16,7 @@ // ------------------------------------------------ using Elastic.Clients.Elasticsearch.AsyncSearch; +using Elastic.Clients.Elasticsearch.Autoscaling; using Elastic.Clients.Elasticsearch.Ccr; using Elastic.Clients.Elasticsearch.Cluster; using Elastic.Clients.Elasticsearch.Enrich; @@ -42,6 +43,8 @@ public partial class ElasticsearchClient { public AsyncSearchNamespace AsyncSearch { get; private set; } + public AutoscalingNamespace Autoscaling { get; private set; } + public CcrNamespace Ccr { get; private set; } public ClusterNamespace Cluster { get; private set; } @@ -75,6 +78,7 @@ public partial class ElasticsearchClient private partial void SetupNamespaces() { AsyncSearch = new AsyncSearchNamespace(this); + Autoscaling = new AutoscalingNamespace(this); Ccr = new CcrNamespace(this); Cluster = new ClusterNamespace(this); Enrich = new EnrichNamespace(this); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingCapacity.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingCapacity.g.cs new file mode 100644 index 00000000000..477162ebef9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingCapacity.g.cs @@ -0,0 +1,37 @@ +// 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.Autoscaling +{ + public partial class AutoscalingCapacity + { + [JsonInclude] + [JsonPropertyName("node")] + public Elastic.Clients.Elasticsearch.Autoscaling.AutoscalingResources Node { get; init; } + + [JsonInclude] + [JsonPropertyName("total")] + public Elastic.Clients.Elasticsearch.Autoscaling.AutoscalingResources Total { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDecider.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDecider.g.cs new file mode 100644 index 00000000000..da0d7442a9a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDecider.g.cs @@ -0,0 +1,41 @@ +// 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.Autoscaling +{ + public partial class AutoscalingDecider + { + [JsonInclude] + [JsonPropertyName("reason_details")] + public object? ReasonDetails { get; init; } + + [JsonInclude] + [JsonPropertyName("reason_summary")] + public string? ReasonSummary { get; init; } + + [JsonInclude] + [JsonPropertyName("required_capacity")] + public Elastic.Clients.Elasticsearch.Autoscaling.AutoscalingCapacity RequiredCapacity { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDeciders.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDeciders.g.cs new file mode 100644 index 00000000000..fc16736605e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingDeciders.g.cs @@ -0,0 +1,45 @@ +// 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.Autoscaling +{ + public partial class AutoscalingDeciders + { + [JsonInclude] + [JsonPropertyName("current_capacity")] + public Elastic.Clients.Elasticsearch.Autoscaling.AutoscalingCapacity CurrentCapacity { get; init; } + + [JsonInclude] + [JsonPropertyName("current_nodes")] + public IReadOnlyCollection CurrentNodes { get; init; } + + [JsonInclude] + [JsonPropertyName("deciders")] + public Dictionary Deciders { get; init; } + + [JsonInclude] + [JsonPropertyName("required_capacity")] + public Elastic.Clients.Elasticsearch.Autoscaling.AutoscalingCapacity RequiredCapacity { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingNode.g.cs new file mode 100644 index 00000000000..ef17fa23102 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingNode.g.cs @@ -0,0 +1,33 @@ +// 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.Autoscaling +{ + public partial class AutoscalingNode + { + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingResources.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingResources.g.cs new file mode 100644 index 00000000000..1fdff70f661 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Autoscaling/AutoscalingResources.g.cs @@ -0,0 +1,37 @@ +// 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.Autoscaling +{ + public partial class AutoscalingResources + { + [JsonInclude] + [JsonPropertyName("memory")] + public int Memory { get; init; } + + [JsonInclude] + [JsonPropertyName("storage")] + public int Storage { get; init; } + } +} \ No newline at end of file