diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index def05f22a0d..afc98a8a416 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -275,6 +275,7 @@ internal static class ApiUrlLookup internal static ApiUrls NodesStats = new ApiUrls(new[] { "_nodes/stats", "_nodes/{node_id}/stats", "_nodes/stats/{metric}", "_nodes/{node_id}/stats/{metric}", "_nodes/stats/{metric}/{index_metric}", "_nodes/{node_id}/stats/{metric}/{index_metric}" }); internal static ApiUrls NodesUsage = new ApiUrls(new[] { "_nodes/usage", "_nodes/{node_id}/usage", "_nodes/usage/{metric}", "_nodes/{node_id}/usage/{metric}" }); internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); + internal static ApiUrls NoNamespaceCapabilities = new ApiUrls(new[] { "_capabilities" }); internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); @@ -317,6 +318,10 @@ internal static class ApiUrlLookup internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); + internal static ApiUrls ProfilingFlamegraph = new ApiUrls(new[] { "_profiling/flamegraph" }); + internal static ApiUrls ProfilingStacktraces = new ApiUrls(new[] { "_profiling/stacktraces" }); + internal static ApiUrls ProfilingStatus = new ApiUrls(new[] { "_profiling/status" }); + internal static ApiUrls ProfilingTopnFunctions = new ApiUrls(new[] { "_profiling/topn/functions" }); internal static ApiUrls QueryRulesDeleteRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); internal static ApiUrls QueryRulesDeleteRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" }); internal static ApiUrls QueryRulesGetRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.Converters.g.cs new file mode 100644 index 00000000000..e3b4fe0404c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Json; + +public sealed partial class CapabilitiesRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.CapabilitiesRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CapabilitiesRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.g.cs new file mode 100644 index 00000000000..2ed4eb6da99 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.g.cs @@ -0,0 +1,314 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +public sealed partial class CapabilitiesRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public System.Collections.Generic.ICollection? Capabilities { get => Q?>("capabilities"); set => Q("capabilities", value); } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public bool? LocalOnly { get => Q("local_only"); set => Q("local_only", value); } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? Method { get => Q("method"); set => Q("method", value); } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public System.Collections.Generic.ICollection? Parameters { get => Q?>("parameters"); set => Q("parameters", value); } + + /// + /// + /// API path to check + /// + /// + public string? Path { get => Q("path"); set => Q("path", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Json.CapabilitiesRequestConverter))] +public sealed partial class CapabilitiesRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public CapabilitiesRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public CapabilitiesRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.NoNamespaceCapabilities; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "capabilities"; + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public System.Collections.Generic.ICollection? Capabilities { get => Q?>("capabilities"); set => Q("capabilities", value); } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public bool? LocalOnly { get => Q("local_only"); set => Q("local_only", value); } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? Method { get => Q("method"); set => Q("method", value); } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public System.Collections.Generic.ICollection? Parameters { get => Q?>("parameters"); set => Q("parameters", value); } + + /// + /// + /// API path to check + /// + /// + public string? Path { get => Q("path"); set => Q("path", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported. +/// +/// +public readonly partial struct CapabilitiesRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.CapabilitiesRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CapabilitiesRequestDescriptor(Elastic.Clients.Elasticsearch.CapabilitiesRequest instance) + { + Instance = instance; + } + + public CapabilitiesRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(Elastic.Clients.Elasticsearch.CapabilitiesRequest instance) => new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Capabilities(System.Collections.Generic.ICollection? value) + { + Instance.Capabilities = value; + return this; + } + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Capabilities(params string[] values) + { + Instance.Capabilities = [.. values]; + return this; + } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor LocalOnly(bool? value = true) + { + Instance.LocalOnly = value; + return this; + } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Method(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? value) + { + Instance.Method = value; + return this; + } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Parameters(System.Collections.Generic.ICollection? value) + { + Instance.Parameters = value; + return this; + } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Parameters(params string[] values) + { + Instance.Parameters = [.. values]; + return this; + } + + /// + /// + /// API path to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Path(string? value) + { + Instance.Path = value; + return this; + } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.CapabilitiesRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.Converters.g.cs new file mode 100644 index 00000000000..1a535f49ec1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.Converters.g.cs @@ -0,0 +1,90 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Json; + +public sealed partial class CapabilitiesResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropClusterName = System.Text.Json.JsonEncodedText.Encode("cluster_name"); + private static readonly System.Text.Json.JsonEncodedText PropFailures = System.Text.Json.JsonEncodedText.Encode("failures"); + private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("_nodes"); + private static readonly System.Text.Json.JsonEncodedText PropSupported = System.Text.Json.JsonEncodedText.Encode("supported"); + + public override Elastic.Clients.Elasticsearch.CapabilitiesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propClusterName = default; + LocalJsonValue?> propFailures = default; + LocalJsonValue propNodes = default; + LocalJsonValue propSupported = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propClusterName.TryReadProperty(ref reader, options, PropClusterName, null)) + { + continue; + } + + if (propFailures.TryReadProperty(ref reader, options, PropFailures, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propNodes.TryReadProperty(ref reader, options, PropNodes, null)) + { + continue; + } + + if (propSupported.TryReadProperty(ref reader, options, PropSupported, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.CapabilitiesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + ClusterName = propClusterName.Value, + Failures = propFailures.Value, + Nodes = propNodes.Value, + Supported = propSupported.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CapabilitiesResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropClusterName, value.ClusterName, null, null); + writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropNodes, value.Nodes, null, null); + writer.WriteProperty(options, PropSupported, value.Supported, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs new file mode 100644 index 00000000000..2b0083e511e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs @@ -0,0 +1,56 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Json.CapabilitiesResponseConverter))] +public sealed partial class CapabilitiesResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CapabilitiesResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal CapabilitiesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +string ClusterName { get; set; } + public System.Collections.Generic.IReadOnlyCollection? Failures { get; set; } + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.NodeStatistics Nodes { get; set; } + public +#if NET7_0_OR_GREATER +required +#endif +bool? Supported { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.g.cs new file mode 100644 index 00000000000..8ce9ae7bee1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class FlamegraphRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs new file mode 100644 index 00000000000..d73d9368e6b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs @@ -0,0 +1,153 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +public sealed partial class FlamegraphRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.FlamegraphRequestConverter))] +public sealed partial class FlamegraphRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public FlamegraphRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public FlamegraphRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingFlamegraph; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.flamegraph"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +public readonly partial struct FlamegraphRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest instance) + { + Instance = instance; + } + + public FlamegraphRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.Converters.g.cs new file mode 100644 index 00000000000..0c0390a8fd3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class FlamegraphResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.g.cs new file mode 100644 index 00000000000..52166889edf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.FlamegraphResponseConverter))] +public sealed partial class FlamegraphResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FlamegraphResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Value { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.Converters.g.cs new file mode 100644 index 00000000000..ed02c355788 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class ProfilingStatusRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.g.cs new file mode 100644 index 00000000000..45b01e7af7c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.g.cs @@ -0,0 +1,220 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +public sealed partial class ProfilingStatusRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// Period to wait for a connection to the master node. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public bool? WaitForResourcesCreated { get => Q("wait_for_resources_created"); set => Q("wait_for_resources_created", value); } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingStatusRequestConverter))] +public sealed partial class ProfilingStatusRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public ProfilingStatusRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public ProfilingStatusRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingStatus; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "profiling.status"; + + /// + /// + /// Period to wait for a connection to the master node. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public bool? WaitForResourcesCreated { get => Q("wait_for_resources_created"); set => Q("wait_for_resources_created", value); } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +public readonly partial struct ProfilingStatusRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ProfilingStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest instance) + { + Instance = instance; + } + + public ProfilingStatusRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Period to wait for a connection to the master node. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.MasterTimeout = value; + return this; + } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor WaitForResourcesCreated(bool? value = true) + { + Instance.WaitForResourcesCreated = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.Converters.g.cs new file mode 100644 index 00000000000..e370a4c477d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.Converters.g.cs @@ -0,0 +1,63 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class ProfilingStatusResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropOperationMode = System.Text.Json.JsonEncodedText.Encode("operation_mode"); + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propOperationMode = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propOperationMode.TryReadProperty(ref reader, options, PropOperationMode, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + OperationMode = propOperationMode.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropOperationMode, value.OperationMode, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.g.cs new file mode 100644 index 00000000000..bde88a214a8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingStatusResponseConverter))] +public sealed partial class ProfilingStatusResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ProfilingStatusResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ProfilingStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode OperationMode { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.g.cs new file mode 100644 index 00000000000..c473a380c36 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class StacktracesRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs new file mode 100644 index 00000000000..37d255763db --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs @@ -0,0 +1,153 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +public sealed partial class StacktracesRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Extracts raw stacktrace information from Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.StacktracesRequestConverter))] +public sealed partial class StacktracesRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public StacktracesRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public StacktracesRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingStacktraces; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.stacktraces"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Extracts raw stacktrace information from Universal Profiling. +/// +/// +public readonly partial struct StacktracesRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest instance) + { + Instance = instance; + } + + public StacktracesRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.Converters.g.cs new file mode 100644 index 00000000000..4787848008a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class StacktracesResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.g.cs new file mode 100644 index 00000000000..20114aca8f2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.StacktracesResponseConverter))] +public sealed partial class StacktracesResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StacktracesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Value { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.g.cs new file mode 100644 index 00000000000..a9929503038 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class TopnFunctionsRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs new file mode 100644 index 00000000000..244701b702b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs @@ -0,0 +1,153 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +public sealed partial class TopnFunctionsRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Extracts a list of topN functions from Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.TopnFunctionsRequestConverter))] +public sealed partial class TopnFunctionsRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public TopnFunctionsRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public TopnFunctionsRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingTopnFunctions; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.topn_functions"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Extracts a list of topN functions from Universal Profiling. +/// +/// +public readonly partial struct TopnFunctionsRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest instance) + { + Instance = instance; + } + + public TopnFunctionsRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.Converters.g.cs new file mode 100644 index 00000000000..26f57159371 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.Converters.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class TopnFunctionsResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.g.cs new file mode 100644 index 00000000000..ee72480cd76 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.TopnFunctionsResponseConverter))] +public sealed partial class TopnFunctionsResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal TopnFunctionsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Value { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs new file mode 100644 index 00000000000..1a31c837723 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs @@ -0,0 +1,176 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +public partial class ProfilingNamespacedClient : Elastic.Clients.Elasticsearch.NamespacedClientProxy +{ + /// + /// + /// Initializes a new instance of the class for mocking. + /// + /// + protected ProfilingNamespacedClient() : base() + { + } + + internal ProfilingNamespacedClient(Elastic.Clients.Elasticsearch.ElasticsearchClient client) : base(client) + { + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Flamegraph(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Flamegraph(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task FlamegraphAsync(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task FlamegraphAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Stacktraces(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Stacktraces(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task StacktracesAsync(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StacktracesAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status() + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task StatusAsync(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StatusAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StatusAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse TopnFunctions(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse TopnFunctions(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task TopnFunctionsAsync(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task TopnFunctionsAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } +} \ 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 89cb5e09f45..597c5e4348d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -41,6 +41,7 @@ public partial class ElasticsearchClient public virtual Elastic.Clients.Elasticsearch.LicenseManagement.LicenseManagementNamespacedClient LicenseManagement { get; private set; } public virtual Elastic.Clients.Elasticsearch.MachineLearning.MachineLearningNamespacedClient MachineLearning { get; private set; } public virtual Elastic.Clients.Elasticsearch.Nodes.NodesNamespacedClient Nodes { get; private set; } + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingNamespacedClient Profiling { get; private set; } public virtual Elastic.Clients.Elasticsearch.QueryRules.QueryRulesNamespacedClient QueryRules { get; private set; } public virtual Elastic.Clients.Elasticsearch.Rollup.RollupNamespacedClient Rollup { get; private set; } public virtual Elastic.Clients.Elasticsearch.SearchableSnapshots.SearchableSnapshotsNamespacedClient SearchableSnapshots { get; private set; } @@ -75,6 +76,7 @@ private partial void SetupNamespaces() LicenseManagement = new Elastic.Clients.Elasticsearch.LicenseManagement.LicenseManagementNamespacedClient(this); MachineLearning = new Elastic.Clients.Elasticsearch.MachineLearning.MachineLearningNamespacedClient(this); Nodes = new Elastic.Clients.Elasticsearch.Nodes.NodesNamespacedClient(this); + Profiling = new Elastic.Clients.Elasticsearch.Profiling.ProfilingNamespacedClient(this); QueryRules = new Elastic.Clients.Elasticsearch.QueryRules.QueryRulesNamespacedClient(this); Rollup = new Elastic.Clients.Elasticsearch.Rollup.RollupNamespacedClient(this); SearchableSnapshots = new Elastic.Clients.Elasticsearch.SearchableSnapshots.SearchableSnapshotsNamespacedClient(this); @@ -224,6 +226,52 @@ public virtual Elastic.Clients.Elasticsearch.BulkResponse Bulk(Elasti return DoRequestAsync(request, cancellationToken); } + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities(Elastic.Clients.Elasticsearch.CapabilitiesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities() + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(Elastic.Clients.Elasticsearch.CapabilitiesRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.ClearScrollResponse ClearScroll(Elastic.Clients.Elasticsearch.ClearScrollRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.Converters.g.cs new file mode 100644 index 00000000000..72cffa95226 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.Converters.g.cs @@ -0,0 +1,63 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Capabilities.Json; + +public sealed partial class FailedNodeExceptionConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropNodeId = System.Text.Json.JsonEncodedText.Encode("node_id"); + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.FailedNodeException Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propNodeId = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propNodeId.TryReadProperty(ref reader, options, PropNodeId, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Core.Capabilities.FailedNodeException(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + NodeId = propNodeId.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Capabilities.FailedNodeException value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropNodeId, value.NodeId, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs new file mode 100644 index 00000000000..01e0cb8c663 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs @@ -0,0 +1,56 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Capabilities; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Capabilities.Json.FailedNodeExceptionConverter))] +public sealed partial class FailedNodeException +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FailedNodeException(string nodeId) + { + NodeId = nodeId; + } +#if NET7_0_OR_GREATER + public FailedNodeException() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public FailedNodeException() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FailedNodeException(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + string NodeId { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs new file mode 100644 index 00000000000..3db65735b3f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs @@ -0,0 +1,123 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Capabilities.Json; + +public sealed partial class RestMethodConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberDelete = System.Text.Json.JsonEncodedText.Encode("DELETE"); + private static readonly System.Text.Json.JsonEncodedText MemberGet = System.Text.Json.JsonEncodedText.Encode("GET"); + private static readonly System.Text.Json.JsonEncodedText MemberHead = System.Text.Json.JsonEncodedText.Encode("HEAD"); + private static readonly System.Text.Json.JsonEncodedText MemberPost = System.Text.Json.JsonEncodedText.Encode("POST"); + private static readonly System.Text.Json.JsonEncodedText MemberPut = System.Text.Json.JsonEncodedText.Encode("PUT"); + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberDelete)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete; + } + + if (reader.ValueTextEquals(MemberGet)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get; + } + + if (reader.ValueTextEquals(MemberHead)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head; + } + + if (reader.ValueTextEquals(MemberPost)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post; + } + + if (reader.ValueTextEquals(MemberPut)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberDelete.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete; + } + + if (string.Equals(value, MemberGet.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get; + } + + if (string.Equals(value, MemberHead.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head; + } + + if (string.Equals(value, MemberPost.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post; + } + + if (string.Equals(value, MemberPut.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete: + writer.WriteStringValue(MemberDelete); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get: + writer.WriteStringValue(MemberGet); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head: + writer.WriteStringValue(MemberHead); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post: + writer.WriteStringValue(MemberPost); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put: + writer.WriteStringValue(MemberPut); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.g.cs new file mode 100644 index 00000000000..96ed621e551 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.g.cs @@ -0,0 +1,39 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Capabilities; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Capabilities.Json.RestMethodConverter))] +public enum RestMethod +{ + [System.Runtime.Serialization.EnumMember(Value = "DELETE")] + Delete, + [System.Runtime.Serialization.EnumMember(Value = "GET")] + Get, + [System.Runtime.Serialization.EnumMember(Value = "HEAD")] + Head, + [System.Runtime.Serialization.EnumMember(Value = "POST")] + Post, + [System.Runtime.Serialization.EnumMember(Value = "PUT")] + Put +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.Converters.g.cs new file mode 100644 index 00000000000..512e8f08032 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.Converters.g.cs @@ -0,0 +1,95 @@ +// 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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling.Json; + +public sealed partial class ProfilingOperationModeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberRunning = System.Text.Json.JsonEncodedText.Encode("RUNNING"); + private static readonly System.Text.Json.JsonEncodedText MemberStopped = System.Text.Json.JsonEncodedText.Encode("STOPPED"); + private static readonly System.Text.Json.JsonEncodedText MemberStopping = System.Text.Json.JsonEncodedText.Encode("STOPPING"); + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberRunning)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running; + } + + if (reader.ValueTextEquals(MemberStopped)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped; + } + + if (reader.ValueTextEquals(MemberStopping)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberRunning.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running; + } + + if (string.Equals(value, MemberStopped.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped; + } + + if (string.Equals(value, MemberStopping.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running: + writer.WriteStringValue(MemberRunning); + break; + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped: + writer.WriteStringValue(MemberStopped); + break; + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping: + writer.WriteStringValue(MemberStopping); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.g.cs new file mode 100644 index 00000000000..5be6774c4d0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.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. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingOperationModeConverter))] +public enum ProfilingOperationMode +{ + [System.Runtime.Serialization.EnumMember(Value = "RUNNING")] + Running, + [System.Runtime.Serialization.EnumMember(Value = "STOPPED")] + Stopped, + [System.Runtime.Serialization.EnumMember(Value = "STOPPING")] + Stopping +} \ No newline at end of file