diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index 6facc66b7f..544c7c94a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -148,6 +148,7 @@ internal static class ApiUrlLookup internal static ApiUrls InferenceCompletion = new ApiUrls(new[] { "_inference/completion/{inference_id}" }); internal static ApiUrls InferenceDelete = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); internal static ApiUrls InferenceGet = new ApiUrls(new[] { "_inference", "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); + internal static ApiUrls InferenceInference = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); internal static ApiUrls InferencePut = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); internal static ApiUrls InferencePutAlibabacloud = new ApiUrls(new[] { "_inference/{task_type}/{alibabacloud_inference_id}" }); internal static ApiUrls InferencePutAmazonbedrock = new ApiUrls(new[] { "_inference/{task_type}/{amazonbedrock_inference_id}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs new file mode 100644 index 0000000000..7b725d1f6b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs @@ -0,0 +1,401 @@ +// 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.Inference; + +public sealed partial class InferenceRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +internal sealed partial class InferenceRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropInput = System.Text.Json.JsonEncodedText.Encode("input"); + private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query"); + private static readonly System.Text.Json.JsonEncodedText PropTaskSettings = System.Text.Json.JsonEncodedText.Encode("task_settings"); + + public override Elastic.Clients.Elasticsearch.Inference.InferenceRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue> propInput = default; + LocalJsonValue propQuery = default; + LocalJsonValue propTaskSettings = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propInput.TryReadProperty(ref reader, options, PropInput, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) + { + continue; + } + + if (propQuery.TryReadProperty(ref reader, options, PropQuery, null)) + { + continue; + } + + if (propTaskSettings.TryReadProperty(ref reader, options, PropTaskSettings, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + 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.Inference.InferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Input = propInput.Value, + Query = propQuery.Value, + TaskSettings = propTaskSettings.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropInput, value.Input, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropQuery, value.Query, null, null); + writer.WriteProperty(options, PropTaskSettings, value.TaskSettings, null, null); + writer.WriteEndObject(); + } +} + +/// +/// +/// Perform inference on the service. +/// +/// +/// This API enables you to use machine learning models to perform specific tasks on data that you provide as an input. +/// It returns a response with the results of the tasks. +/// The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API. +/// +/// +/// For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation. +/// +/// +/// info +/// The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.InferenceRequestConverter))] +public sealed partial class InferenceRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Obsolete("The request contains additional required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceRequest(Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + [System.Obsolete("The request contains additional required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceRequest(Elastic.Clients.Elasticsearch.Id inferenceId, System.Collections.Generic.ICollection input) : base(r => r.Required("inference_id", inferenceId)) + { + Input = input; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, System.Collections.Generic.ICollection input) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + Input = input; + } +#if NET7_0_OR_GREATER + public InferenceRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal InferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.InferenceInference; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "inference.inference"; + + /// + /// + /// The unique identifier for the inference endpoint. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Id InferenceId { get => P("inference_id"); set => PR("inference_id", value); } + + /// + /// + /// The type of inference task that the model performs. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.TaskType? TaskType { get => P("task_type"); set => PO("task_type", value); } + + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// The text on which you want to perform the inference task. + /// It can be a single string or an array. + /// + /// + /// info + /// Inference endpoints for the completion task type currently only support a single string as input. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection Input { get; set; } + + /// + /// + /// The query input, which is required only for the rerank task. + /// It is not required for other tasks. + /// + /// + public string? Query { get; set; } + + /// + /// + /// Task settings for the individual inference request. + /// These settings are specific to the task type you specified and override the task settings specified when initializing the service. + /// + /// + public object? TaskSettings { get; set; } +} + +/// +/// +/// Perform inference on the service. +/// +/// +/// This API enables you to use machine learning models to perform specific tasks on data that you provide as an input. +/// It returns a response with the results of the tasks. +/// The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API. +/// +/// +/// For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation. +/// +/// +/// info +/// The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. +/// +/// +public readonly partial struct InferenceRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Inference.InferenceRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.InferenceRequest instance) + { + Instance = instance; + } + + public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Id inferenceId) + { +#pragma warning disable CS0618 + Instance = new Elastic.Clients.Elasticsearch.Inference.InferenceRequest(inferenceId); +#pragma warning restore CS0618 + } + + public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) + { +#pragma warning disable CS0618 + Instance = new Elastic.Clients.Elasticsearch.Inference.InferenceRequest(taskType, inferenceId); +#pragma warning restore CS0618 + } + + [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] + public InferenceRequestDescriptor() + { + throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.InferenceRequest instance) => new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Inference.InferenceRequest(Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// The unique identifier for the inference endpoint. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id value) + { + Instance.InferenceId = value; + return this; + } + + /// + /// + /// The type of inference task that the model performs. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? value) + { + Instance.TaskType = value; + return this; + } + + /// + /// + /// The amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + /// + /// + /// The text on which you want to perform the inference task. + /// It can be a single string or an array. + /// + /// + /// info + /// Inference endpoints for the completion task type currently only support a single string as input. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Input(System.Collections.Generic.ICollection value) + { + Instance.Input = value; + return this; + } + + /// + /// + /// The text on which you want to perform the inference task. + /// It can be a single string or an array. + /// + /// + /// info + /// Inference endpoints for the completion task type currently only support a single string as input. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Input(params string[] values) + { + Instance.Input = [.. values]; + return this; + } + + /// + /// + /// The query input, which is required only for the rerank task. + /// It is not required for other tasks. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Query(string? value) + { + Instance.Query = value; + return this; + } + + /// + /// + /// Task settings for the individual inference request. + /// These settings are specific to the task type you specified and override the task settings specified when initializing the service. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor TaskSettings(object? value) + { + Instance.TaskSettings = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Inference.InferenceRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(new Elastic.Clients.Elasticsearch.Inference.InferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor 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/Inference/InferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs new file mode 100644 index 0000000000..7f0395c721 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs @@ -0,0 +1,58 @@ +// 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.Inference; + +internal sealed partial class InferenceResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Inference.InferenceResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Inference.InferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Result, null); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.InferenceResponseConverter))] +public sealed partial class InferenceResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal InferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.Inference.InferenceResult Result { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs index 4aee0864f6..d4ea3754aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs @@ -93,7 +93,6 @@ internal GetRepositoriesMeteringInfoRequest(Elastic.Clients.Elasticsearch.Serial /// /// /// Comma-separated list of node IDs or names used to limit returned information. - /// All the nodes selective options are explained here. /// /// public @@ -138,7 +137,6 @@ public GetRepositoriesMeteringInfoRequestDescriptor() /// /// /// Comma-separated list of node IDs or names used to limit returned information. - /// All the nodes selective options are explained here. /// /// public Elastic.Clients.Elasticsearch.Nodes.GetRepositoriesMeteringInfoRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkPutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkPutRoleRequest.g.cs index 369f4e686a..2e95816af0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkPutRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkPutRoleRequest.g.cs @@ -40,10 +40,10 @@ internal sealed partial class BulkPutRoleRequestConverter : System.Text.Json.Ser public override Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue> propRoles = default; + LocalJsonValue> propRoles = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRoles.TryReadProperty(ref reader, options, PropRoles, static System.Collections.Generic.IDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) + if (propRoles.TryReadProperty(ref reader, options, PropRoles, static System.Collections.Generic.IDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequest Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } } @@ -85,7 +85,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class BulkPutRoleRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public BulkPutRoleRequest(System.Collections.Generic.IDictionary roles) + public BulkPutRoleRequest(System.Collections.Generic.IDictionary roles) { Roles = roles; } @@ -130,7 +130,7 @@ internal BulkPutRoleRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif - System.Collections.Generic.IDictionary Roles { get; set; } + System.Collections.Generic.IDictionary Roles { get; set; } } /// @@ -176,7 +176,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Refre /// A dictionary of role name to RoleDescriptor objects to add or update /// /// - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Collections.Generic.IDictionary value) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Collections.Generic.IDictionary value) { Instance.Roles = value; return this; @@ -189,7 +189,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles /// public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles() { - Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -198,9 +198,9 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles /// A dictionary of role name to RoleDescriptor objects to add or update /// /// - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action? action) { - Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } @@ -209,15 +209,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles /// A dictionary of role name to RoleDescriptor objects to add or update /// /// - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action>? action) { - Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); Instance.Roles.Add(key, value); return this; } @@ -229,7 +229,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRo /// public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(string key) { - Instance.Roles = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.Roles = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -240,10 +240,10 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles /// public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.Roles = items; @@ -252,22 +252,22 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); - Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action? action) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); - Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action>? action) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); - Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } @@ -365,7 +365,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Collections.Generic.IDictionary value) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Collections.Generic.IDictionary value) { Instance.Roles = value; return this; @@ -378,7 +378,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles() { - Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -387,15 +387,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(System.Action>? action) { - Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.Roles = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); Instance.Roles.Add(key, value); return this; } @@ -407,7 +407,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(string key) { - Instance.Roles = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.Roles = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -418,10 +418,10 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor Roles(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.Roles = items; @@ -430,15 +430,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); - Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkPutRoleRequestDescriptor AddRole(string key, System.Action>? action) { - Instance.Roles ??= new System.Collections.Generic.Dictionary(); - Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.Roles ??= new System.Collections.Generic.Dictionary(); + Instance.Roles.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs index 648849c7bf..e7871ca1e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequest LocalJsonValue propExpiration = default; LocalJsonValue> propIds = default; LocalJsonValue?> propMetadata = default; - LocalJsonValue?> propRoleDescriptors = default; + LocalJsonValue?> propRoleDescriptors = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequest continue; } - if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) { continue; } @@ -88,7 +88,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); writer.WriteProperty(options, PropIds, value.Ids, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } } @@ -192,7 +192,7 @@ internal BulkUpdateApiKeysRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } + public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } } /// @@ -331,7 +331,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -350,7 +350,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -365,9 +365,9 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } @@ -382,15 +382,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -408,7 +408,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -425,10 +425,10 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -437,22 +437,22 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } @@ -643,7 +643,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -662,7 +662,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -677,15 +677,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -703,7 +703,7 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -720,10 +720,10 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor /// public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -732,15 +732,15 @@ public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.BulkUpdateApiKeysRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs index d464e85749..07845cd36c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequest Read( LocalJsonValue propExpiration = default; LocalJsonValue?> propMetadata = default; LocalJsonValue propName = default; - LocalJsonValue?> propRoleDescriptors = default; + LocalJsonValue?> propRoleDescriptors = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequest Read( continue; } - if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) { continue; } @@ -94,7 +94,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } } @@ -192,7 +192,7 @@ internal CreateApiKeyRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// - public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } + public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } } /// @@ -324,7 +324,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Name /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -346,7 +346,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Role /// public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -364,9 +364,9 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Role /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } @@ -384,15 +384,15 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Role /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -413,7 +413,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddR /// public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -433,10 +433,10 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Role /// public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -445,22 +445,22 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor Role public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } @@ -649,7 +649,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -671,7 +671,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -689,15 +689,15 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -718,7 +718,7 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -738,10 +738,10 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -750,15 +750,15 @@ public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.CreateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs index ead5afce2a..1ff6146ab3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRoleResponseConverter : System.Text.Json.Serial { public override Elastic.Clients.Elasticsearch.Security.GetRoleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Roles = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Roles = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetRoleResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Roles, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Roles, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstru #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Roles { get; set; } +System.Collections.Generic.IReadOnlyDictionary Roles { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs index 171929f630..29f39d0644 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequest Read( reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propExpiration = default; LocalJsonValue?> propMetadata = default; - LocalJsonValue?> propRoleDescriptors = default; + LocalJsonValue?> propRoleDescriptors = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequest Read( continue; } - if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) { continue; } @@ -79,7 +79,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); - writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } } @@ -181,7 +181,7 @@ internal UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } + public System.Collections.Generic.IDictionary? RoleDescriptors { get; set; } } /// @@ -322,7 +322,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddM /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -341,7 +341,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor Role /// public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -356,9 +356,9 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor Role /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } @@ -373,15 +373,15 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor Role /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -399,7 +399,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddR /// public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -416,10 +416,10 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor Role /// public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -428,22 +428,22 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor Role public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } @@ -636,7 +636,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Collections.Generic.IDictionary? value) { Instance.RoleDescriptors = value; return this; @@ -655,7 +655,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors() { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(null); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(null); return this; } @@ -670,15 +670,15 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(System.Action>? action) { - Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action); + Instance.RoleDescriptors = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); Instance.RoleDescriptors.Add(key, value); return this; } @@ -696,7 +696,7 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(string key) { - Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null) } }; + Instance.RoleDescriptors = new System.Collections.Generic.Dictionary { { key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null) } }; return this; } @@ -713,10 +713,10 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor RoleDescriptors(params string[] keys) { - var items = new System.Collections.Generic.Dictionary(); + var items = new System.Collections.Generic.Dictionary(); foreach (var key in keys) { - items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); } Instance.RoleDescriptors = items; @@ -725,15 +725,15 @@ public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Security.UpdateApiKeyRequestDescriptor AddRoleDescriptor(string key, System.Action>? action) { - Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); - Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + Instance.RoleDescriptors ??= new System.Collections.Generic.Dictionary(); + Instance.RoleDescriptors.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs index 705c6f224d..de9e48a310 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs @@ -98,7 +98,7 @@ internal GetSynonymRuleResponse(Elastic.Clients.Elasticsearch.Serialization.Json /// /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 + /// Synonyms, in Solr format, that conform the synonym rule. /// /// public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs index 0f949645e5..af8c9f80e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs @@ -324,6 +324,86 @@ public virtual Elastic.Clients.Elasticsearch.Inference.GetInferenceResponse Get( return DoRequestAsync(request, cancellationToken); } + public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Inference.InferenceRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Id inferenceId) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(inferenceId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Id inferenceId, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(inferenceId); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(taskType, inferenceId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Inference.InferenceResponse Inference(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(taskType, inferenceId); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task InferenceAsync(Elastic.Clients.Elasticsearch.Inference.InferenceRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task InferenceAsync(Elastic.Clients.Elasticsearch.Id inferenceId, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(inferenceId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task InferenceAsync(Elastic.Clients.Elasticsearch.Id inferenceId, System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(inferenceId); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task InferenceAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(taskType, inferenceId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task InferenceAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Inference.InferenceRequestDescriptor(taskType, inferenceId); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.Inference.PutInferenceResponse Put(Elastic.Clients.Elasticsearch.Inference.PutInferenceRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptorx.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptor.g.cs similarity index 65% rename from src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptorx.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptor.g.cs index 6a8b7d8e8a..1c2a1beb72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptorx.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringRoleDescriptor.g.cs @@ -23,91 +23,91 @@ namespace Elastic.Clients.Elasticsearch.Fluent; -public readonly partial struct FluentDictionaryOfStringRoleDescriptorx +public readonly partial struct FluentDictionaryOfStringRoleDescriptor { - private readonly System.Collections.Generic.Dictionary _items = new(); + private readonly System.Collections.Generic.Dictionary _items = new(); - private System.Collections.Generic.IDictionary Value => _items; + private System.Collections.Generic.IDictionary Value => _items; - public FluentDictionaryOfStringRoleDescriptorx() + public FluentDictionaryOfStringRoleDescriptor() { } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { _items.Add(key, value); return this; } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key) { - _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key, System.Action>? action) { - _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static System.Collections.Generic.IDictionary Build(System.Action>? action) + internal static System.Collections.Generic.IDictionary Build(System.Action>? action) { if (action is null) { - return new System.Collections.Generic.Dictionary(); + return new System.Collections.Generic.Dictionary(); } - var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx(); + var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor(); action.Invoke(builder); return builder.Value; } } -public readonly partial struct FluentDictionaryOfStringRoleDescriptorx +public readonly partial struct FluentDictionaryOfStringRoleDescriptor { - private readonly System.Collections.Generic.Dictionary _items = new(); + private readonly System.Collections.Generic.Dictionary _items = new(); - private System.Collections.Generic.IDictionary Value => _items; + private System.Collections.Generic.IDictionary Value => _items; - public FluentDictionaryOfStringRoleDescriptorx() + public FluentDictionaryOfStringRoleDescriptor() { } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value) { _items.Add(key, value); return this; } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key) { - _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(null)); + _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(null)); return this; } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key, System.Action? action) { - _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } - public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx Add(string key, System.Action>? action) + public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor Add(string key, System.Action>? action) { - _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor.Build(action)); + _items.Add(key, Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor.Build(action)); return this; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static System.Collections.Generic.IDictionary Build(System.Action? action) + internal static System.Collections.Generic.IDictionary Build(System.Action? action) { if (action is null) { - return new System.Collections.Generic.Dictionary(); + return new System.Collections.Generic.Dictionary(); } - var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx(); + var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor(); action.Invoke(builder); return builder.Value; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs index 53270d68ce..57f4e1db90 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs @@ -179,8 +179,8 @@ internal CategorizeTextAggregation(Elastic.Clients.Elasticsearch.Serialization.J /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the analyze API. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? CategorizationAnalyzer { get; set; } @@ -294,8 +294,8 @@ public CategorizeTextAggregationDescriptor() /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the analyze API. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? value) @@ -307,8 +307,8 @@ public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescr /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the analyze API. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(System.Func action) @@ -494,8 +494,8 @@ public CategorizeTextAggregationDescriptor() /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the analyze API. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? value) @@ -507,8 +507,8 @@ public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescr /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the analyze API. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(System.Func action) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs index 4bc88f6e05..4ebc1a8d7b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs @@ -59,7 +59,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.ByteSizeConverter))] public sealed partial class ByteSize : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs index 7b6b97acb8..9e64566295 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs @@ -62,7 +62,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Text or location that we want similar documents for or a lookup to a document's field for the text. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.ContextConverter))] public sealed partial class Context : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs index 35fb77c662..238cd02984 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Discounted cumulative gain (DCG) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGainConverter))] public sealed partial class RankEvalMetricDiscountedCumulativeGain @@ -115,7 +115,7 @@ internal RankEvalMetricDiscountedCumulativeGain(Elastic.Clients.Elasticsearch.Se /// /// Discounted cumulative gain (DCG) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricDiscountedCumulativeGainDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs index a2a21860c1..31bbb03877 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Expected Reciprocal Rank (ERR) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRankConverter))] public sealed partial class RankEvalMetricExpectedReciprocalRank @@ -125,7 +125,7 @@ internal RankEvalMetricExpectedReciprocalRank(Elastic.Clients.Elasticsearch.Seri /// /// Expected Reciprocal Rank (ERR) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricExpectedReciprocalRankDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs index 2fcbdf2eca..d7b3fdec1b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Mean Reciprocal Rank /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRankConverter))] public sealed partial class RankEvalMetricMeanReciprocalRank @@ -115,7 +115,7 @@ internal RankEvalMetricMeanReciprocalRank(Elastic.Clients.Elasticsearch.Serializ /// /// Mean Reciprocal Rank /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricMeanReciprocalRankDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs index c6ad704e59..fdd2f1556d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Precision at K (P@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecisionConverter))] public sealed partial class RankEvalMetricPrecision @@ -131,7 +131,7 @@ internal RankEvalMetricPrecision(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// Precision at K (P@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricPrecisionDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs index 45b55f2ba7..31682abc9b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Recall at K (R@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecallConverter))] public sealed partial class RankEvalMetricRecall @@ -115,7 +115,7 @@ internal RankEvalMetricRecall(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// Recall at K (R@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricRecallDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs index cc8e44c0b6..63fd3c97ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs @@ -59,7 +59,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.FuzzinessConverter))] public sealed partial class Fuzziness : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs index ef07f5c6e9..944037bd92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -564,7 +564,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsConverter))] public sealed partial class IndexSettings @@ -681,7 +681,7 @@ internal IndexSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct IndexSettingsDescriptor { @@ -1399,7 +1399,7 @@ internal static Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Buil } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct IndexSettingsDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs index 9dfd94e965..b8993d26f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs @@ -138,7 +138,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Mapping Limit Settings /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsConverter))] public sealed partial class MappingLimitSettings @@ -174,7 +174,7 @@ internal MappingLimitSettings(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// Mapping Limit Settings /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct MappingLimitSettingsDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceResult.g.cs new file mode 100644 index 0000000000..dc38698893 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceResult.g.cs @@ -0,0 +1,190 @@ +// 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.Inference; + +internal sealed partial class InferenceResultConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText VariantCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText VariantRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText VariantSparseEmbedding = System.Text.Json.JsonEncodedText.Encode("sparse_embedding"); + private static readonly System.Text.Json.JsonEncodedText VariantTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + private static readonly System.Text.Json.JsonEncodedText VariantTextEmbeddingBits = System.Text.Json.JsonEncodedText.Encode("text_embedding_bits"); + private static readonly System.Text.Json.JsonEncodedText VariantTextEmbeddingBytes = System.Text.Json.JsonEncodedText.Encode("text_embedding_bytes"); + + public override Elastic.Clients.Elasticsearch.Inference.InferenceResult Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + string? variantType = null; + object? variant = null; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (reader.ValueTextEquals(VariantCompletion)) + { + variantType = VariantCompletion.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (reader.ValueTextEquals(VariantRerank)) + { + variantType = VariantRerank.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (reader.ValueTextEquals(VariantSparseEmbedding)) + { + variantType = VariantSparseEmbedding.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (reader.ValueTextEquals(VariantTextEmbedding)) + { + variantType = VariantTextEmbedding.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (reader.ValueTextEquals(VariantTextEmbeddingBits)) + { + variantType = VariantTextEmbeddingBits.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (reader.ValueTextEquals(VariantTextEmbeddingBytes)) + { + variantType = VariantTextEmbeddingBytes.Value; + reader.Read(); + variant = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + 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.Inference.InferenceResult(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + VariantType = variantType, + Variant = variant + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceResult value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + switch (value.VariantType) + { + case null: + break; + case "completion": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + case "rerank": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + case "sparse_embedding": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + case "text_embedding": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + case "text_embedding_bits": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + case "text_embedding_bytes": + writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.IReadOnlyCollection)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + break; + default: + throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Inference.InferenceResult)}'."); + } + + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.InferenceResultConverter))] +public sealed partial class InferenceResult +{ + internal string? VariantType { get; set; } + internal object? Variant { get; set; } +#if NET7_0_OR_GREATER + public InferenceResult() + { + } +#endif +#if !NET7_0_OR_GREATER + public InferenceResult() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal InferenceResult(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public System.Collections.Generic.IReadOnlyCollection? Completion { get => GetVariant>("completion"); set => SetVariant("completion", value); } + public System.Collections.Generic.IReadOnlyCollection? Rerank { get => GetVariant>("rerank"); set => SetVariant("rerank", value); } + public System.Collections.Generic.IReadOnlyCollection? SparseEmbedding { get => GetVariant>("sparse_embedding"); set => SetVariant("sparse_embedding", value); } + public System.Collections.Generic.IReadOnlyCollection? TextEmbedding { get => GetVariant>("text_embedding"); set => SetVariant("text_embedding", value); } + public System.Collections.Generic.IReadOnlyCollection? TextEmbeddingBits { get => GetVariant>("text_embedding_bits"); set => SetVariant("text_embedding_bits", value); } + public System.Collections.Generic.IReadOnlyCollection? TextEmbeddingBytes { get => GetVariant>("text_embedding_bytes"); set => SetVariant("text_embedding_bytes", value); } + + public static implicit operator Elastic.Clients.Elasticsearch.Inference.InferenceResult(Elastic.Clients.Elasticsearch.Inference.CompletionResult[] value) => new Elastic.Clients.Elasticsearch.Inference.InferenceResult { Completion = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Inference.InferenceResult(Elastic.Clients.Elasticsearch.Inference.RankedDocument[] value) => new Elastic.Clients.Elasticsearch.Inference.InferenceResult { Rerank = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Inference.InferenceResult(Elastic.Clients.Elasticsearch.Inference.SparseEmbeddingResult[] value) => new Elastic.Clients.Elasticsearch.Inference.InferenceResult { SparseEmbedding = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Inference.InferenceResult(Elastic.Clients.Elasticsearch.Inference.TextEmbeddingResult[] value) => new Elastic.Clients.Elasticsearch.Inference.InferenceResult { TextEmbedding = value }; + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private T? GetVariant(string type) + { + if (string.Equals(VariantType, type, System.StringComparison.Ordinal) && Variant is T result) + { + return result; + } + + return default; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private void SetVariant(string type, T? value) + { + VariantType = type; + Variant = value; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs index 1b7fe867e8..5463cc871c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -201,7 +201,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.GeoShapePropertyConverter))] public sealed partial class GeoShapeProperty : Elastic.Clients.Elasticsearch.Mapping.IProperty @@ -252,7 +252,7 @@ internal GeoShapeProperty(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct GeoShapePropertyDescriptor { @@ -434,7 +434,7 @@ internal static Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Build(Sys /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct GeoShapePropertyDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs index f3bf3ee481..60577dcb30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -183,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.ShapePropertyConverter))] public sealed partial class ShapeProperty : Elastic.Clients.Elasticsearch.Mapping.IProperty @@ -232,7 +232,7 @@ internal ShapeProperty(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct ShapePropertyDescriptor { @@ -402,7 +402,7 @@ internal static Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Build(System /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct ShapePropertyDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs index 41ea1c1efa..ad70553788 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs @@ -62,7 +62,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Text that we want similar documents for or a lookup to a document's field for the text. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.LikeConverter))] public sealed partial class Like : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs index 0c8769c948..f8acfd0daa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs @@ -51,13 +51,13 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te LocalJsonValue propId = default; LocalJsonValue propInvalidated = default; LocalJsonValue propInvalidation = default; - LocalJsonValue>?> propLimitedBy = default; + LocalJsonValue>?> propLimitedBy = default; LocalJsonValue> propMetadata = default; LocalJsonValue propName = default; LocalJsonValue propProfileUid = default; LocalJsonValue propRealm = default; LocalJsonValue propRealmType = default; - LocalJsonValue?> propRoleDescriptors = default; + LocalJsonValue?> propRoleDescriptors = default; LocalJsonValue?> propSort = default; LocalJsonValue propType = default; LocalJsonValue propUsername = default; @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propLimitedBy.TryReadProperty(ref reader, options, PropLimitedBy, static System.Collections.Generic.IReadOnlyCollection>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue>(o, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))) + if (propLimitedBy.TryReadProperty(ref reader, options, PropLimitedBy, static System.Collections.Generic.IReadOnlyCollection>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue>(o, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))) { continue; } @@ -123,7 +123,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) + if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.IReadOnlyDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) { continue; } @@ -183,13 +183,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropInvalidated, value.Invalidated, null, null); writer.WriteProperty(options, PropInvalidation, value.Invalidation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropLimitedBy, value.LimitedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteProperty(options, PropLimitedBy, value.LimitedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropProfileUid, value.ProfileUid, null, null); writer.WriteProperty(options, PropRealm, value.Realm, null, null); writer.WriteProperty(options, PropRealmType, value.RealmType, null, null); - writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSort, value.Sort, 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, PropType, value.Type, null, null); writer.WriteProperty(options, PropUsername, value.Username, null, null); @@ -294,7 +294,7 @@ internal ApiKey(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSenti /// An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions. /// /// - public System.Collections.Generic.IReadOnlyCollection>? LimitedBy { get; set; } + public System.Collections.Generic.IReadOnlyCollection>? LimitedBy { get; set; } /// /// @@ -349,7 +349,7 @@ internal ApiKey(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSenti /// An empty role descriptor means the API key inherits the owner user’s permissions. /// /// - public System.Collections.Generic.IReadOnlyDictionary? RoleDescriptors { get; set; } + public System.Collections.Generic.IReadOnlyDictionary? RoleDescriptors { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs index 736c908d45..f0e08304bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Security.GrantApiKey Read(ref Syst LocalJsonValue propExpiration = default; LocalJsonValue?> propMetadata = default; LocalJsonValue propName = default; - LocalJsonValue>?> propRoleDescriptors = default; + LocalJsonValue>?> propRoleDescriptors = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Security.GrantApiKey Read(ref Syst continue; } - if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.ICollection>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue>(o, static System.Collections.Generic.IDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))) + if (propRoleDescriptors.TryReadProperty(ref reader, options, PropRoleDescriptors, static System.Collections.Generic.ICollection>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue>(o, static System.Collections.Generic.IDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteProperty(options, PropRoleDescriptors, value.RoleDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteEndObject(); } } @@ -142,7 +142,7 @@ internal GrantApiKey(Elastic.Clients.Elasticsearch.Serialization.JsonConstructor /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public System.Collections.Generic.ICollection>? RoleDescriptors { get; set; } + public System.Collections.Generic.ICollection>? RoleDescriptors { get; set; } } public readonly partial struct GrantApiKeyDescriptor @@ -234,7 +234,7 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor N /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(System.Collections.Generic.ICollection>? value) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(System.Collections.Generic.ICollection>? value) { Instance.RoleDescriptors = value; return this; @@ -247,7 +247,7 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor R /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Collections.Generic.IDictionary[] values) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Collections.Generic.IDictionary[] values) { Instance.RoleDescriptors = [.. values]; return this; @@ -260,12 +260,12 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor R /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action>?[] actions) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action>?[] actions) { - var items = new System.Collections.Generic.List>(); + var items = new System.Collections.Generic.List>(); foreach (var action in actions) { - items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action)); + items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action)); } Instance.RoleDescriptors = items; @@ -370,7 +370,7 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor Name(Elastic /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(System.Collections.Generic.ICollection>? value) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(System.Collections.Generic.ICollection>? value) { Instance.RoleDescriptors = value; return this; @@ -383,7 +383,7 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescript /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Collections.Generic.IDictionary[] values) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Collections.Generic.IDictionary[] values) { Instance.RoleDescriptors = [.. values]; return this; @@ -396,12 +396,12 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescript /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action?[] actions) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action?[] actions) { - var items = new System.Collections.Generic.List>(); + var items = new System.Collections.Generic.List>(); foreach (var action in actions) { - items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action)); + items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action)); } Instance.RoleDescriptors = items; @@ -415,12 +415,12 @@ public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescript /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// /// - public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action>?[] actions) + public Elastic.Clients.Elasticsearch.Security.GrantApiKeyDescriptor RoleDescriptors(params System.Action>?[] actions) { - var items = new System.Collections.Generic.List>(); + var items = new System.Collections.Generic.List>(); foreach (var action in actions) { - items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptorx.Build(action)); + items.Add(Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringRoleDescriptor.Build(action)); } Instance.RoleDescriptors = items; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs index 97265974a2..2dd6fe669f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs @@ -23,7 +23,7 @@ namespace Elastic.Clients.Elasticsearch.Security; -internal sealed partial class RoleDescriptorxConverter : System.Text.Json.Serialization.JsonConverter +internal sealed partial class RoleDescriptorConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropApplications = System.Text.Json.JsonEncodedText.Encode("applications"); private static readonly System.Text.Json.JsonEncodedText PropCluster = System.Text.Json.JsonEncodedText.Encode("cluster"); @@ -38,7 +38,7 @@ internal sealed partial class RoleDescriptorxConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropRunAs = System.Text.Json.JsonEncodedText.Encode("run_as"); private static readonly System.Text.Json.JsonEncodedText PropTransientMetadata = System.Text.Json.JsonEncodedText.Encode("transient_metadata"); - public override Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Security.RoleDescriptor Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue?> propApplications = default; @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Read(ref } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + return new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Applications = propApplications.Value, Cluster = propCluster.Value, @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Read(ref }; } - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RoleDescriptorx value, System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RoleDescriptor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); writer.WriteProperty(options, PropApplications, value.Applications, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); @@ -153,21 +153,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } } -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.RoleDescriptorxConverter))] -public sealed partial class RoleDescriptorx +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.RoleDescriptorConverter))] +public sealed partial class RoleDescriptor { #if NET7_0_OR_GREATER - public RoleDescriptorx() + public RoleDescriptor() { } #endif #if !NET7_0_OR_GREATER - public RoleDescriptorx() + public RoleDescriptor() { } #endif [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - internal RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + internal RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) { _ = sentinel; } @@ -247,31 +247,31 @@ internal RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstru public System.Collections.Generic.IDictionary? TransientMetadata { get; set; } } -public readonly partial struct RoleDescriptorxDescriptor +public readonly partial struct RoleDescriptorDescriptor { - internal Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Instance { get; init; } + internal Elastic.Clients.Elasticsearch.Security.RoleDescriptor Instance { get; init; } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleDescriptorxDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorx instance) + public RoleDescriptorDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptor instance) { Instance = instance; } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleDescriptorxDescriptor() + public RoleDescriptorDescriptor() { - Instance = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + Instance = new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); } - public static explicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorx instance) => new Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(instance); - public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor descriptor) => descriptor.Instance; + public static explicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptor instance) => new Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor descriptor) => descriptor.Instance; /// /// /// A list of application privilege entries /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(System.Collections.Generic.ICollection? value) { Instance.Applications = value; return this; @@ -282,7 +282,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(params Elastic.Clients.Elasticsearch.Security.ApplicationPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(params Elastic.Clients.Elasticsearch.Security.ApplicationPrivileges[] values) { Instance.Applications = [.. values]; return this; @@ -293,7 +293,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -310,7 +310,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Cluster(System.Collections.Generic.ICollection? value) { Instance.Cluster = value; return this; @@ -321,7 +321,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster(params Elastic.Clients.Elasticsearch.Security.ClusterPrivilege[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Cluster(params Elastic.Clients.Elasticsearch.Security.ClusterPrivilege[] values) { Instance.Cluster = [.. values]; return this; @@ -332,7 +332,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Description(string? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Description(string? value) { Instance.Description = value; return this; @@ -343,7 +343,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(System.Collections.Generic.ICollection? value) { Instance.Global = value; return this; @@ -354,7 +354,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(params Elastic.Clients.Elasticsearch.Security.GlobalPrivilege[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(params Elastic.Clients.Elasticsearch.Security.GlobalPrivilege[] values) { Instance.Global = [.. values]; return this; @@ -365,7 +365,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -382,7 +382,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(System.Collections.Generic.ICollection? value) { Instance.Indices = value; return this; @@ -393,7 +393,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(params Elastic.Clients.Elasticsearch.Security.IndicesPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(params Elastic.Clients.Elasticsearch.Security.IndicesPrivileges[] values) { Instance.Indices = [.. values]; return this; @@ -404,7 +404,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(params System.Action>[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -421,7 +421,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor_ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata(System.Collections.Generic.IDictionary? value) { Instance.Metadata = value; return this; @@ -432,7 +432,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor_ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata() + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata() { Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); return this; @@ -443,13 +443,13 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor_ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata(System.Action? action) { Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddMetadatum(string key, object value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor AddMetadatum(string key, object value) { Instance.Metadata ??= new System.Collections.Generic.Dictionary(); Instance.Metadata.Add(key, value); @@ -462,7 +462,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(System.Collections.Generic.ICollection? value) { Instance.RemoteCluster = value; return this; @@ -474,7 +474,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(params Elastic.Clients.Elasticsearch.Security.RemoteClusterPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(params Elastic.Clients.Elasticsearch.Security.RemoteClusterPrivileges[] values) { Instance.RemoteCluster = [.. values]; return this; @@ -486,7 +486,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -503,7 +503,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(System.Collections.Generic.ICollection? value) { Instance.RemoteIndices = value; return this; @@ -514,7 +514,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(params Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(params Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges[] values) { Instance.RemoteIndices = [.. values]; return this; @@ -525,7 +525,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(params System.Action>[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -542,7 +542,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restriction(Elastic.Clients.Elasticsearch.Security.Restriction? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Security.Restriction? value) { Instance.Restriction = value; return this; @@ -553,7 +553,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restriction(System.Action action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Restriction(System.Action action) { Instance.Restriction = Elastic.Clients.Elasticsearch.Security.RestrictionDescriptor.Build(action); return this; @@ -566,7 +566,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptorrun_as field, but a non-empty list will be rejected. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RunAs(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RunAs(System.Collections.Generic.ICollection? value) { Instance.RunAs = value; return this; @@ -579,31 +579,31 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptorrun_as field, but a non-empty list will be rejected. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RunAs(params string[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RunAs(params string[] values) { Instance.RunAs = [.. values]; return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata(System.Collections.Generic.IDictionary? value) { Instance.TransientMetadata = value; return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata() + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata() { Instance.TransientMetadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata(System.Action? action) { Instance.TransientMetadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddTransientMetadatum(string key, object value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor AddTransientMetadatum(string key, object value) { Instance.TransientMetadata ??= new System.Collections.Generic.Dictionary(); Instance.TransientMetadata.Add(key, value); @@ -611,44 +611,44 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor>? action) + internal static Elastic.Clients.Elasticsearch.Security.RoleDescriptor Build(System.Action>? action) { if (action is null) { - return new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + return new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); } - var builder = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + var builder = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; } } -public readonly partial struct RoleDescriptorxDescriptor +public readonly partial struct RoleDescriptorDescriptor { - internal Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Instance { get; init; } + internal Elastic.Clients.Elasticsearch.Security.RoleDescriptor Instance { get; init; } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleDescriptorxDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorx instance) + public RoleDescriptorDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptor instance) { Instance = instance; } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleDescriptorxDescriptor() + public RoleDescriptorDescriptor() { - Instance = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + Instance = new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); } - public static explicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorx instance) => new Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(instance); - public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor descriptor) => descriptor.Instance; + public static explicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptor instance) => new Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor descriptor) => descriptor.Instance; /// /// /// A list of application privilege entries /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(System.Collections.Generic.ICollection? value) { Instance.Applications = value; return this; @@ -659,7 +659,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applicat /// A list of application privilege entries /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(params Elastic.Clients.Elasticsearch.Security.ApplicationPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(params Elastic.Clients.Elasticsearch.Security.ApplicationPrivileges[] values) { Instance.Applications = [.. values]; return this; @@ -670,7 +670,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applicat /// A list of application privilege entries /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applications(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Applications(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -687,7 +687,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Applicat /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Cluster(System.Collections.Generic.ICollection? value) { Instance.Cluster = value; return this; @@ -698,7 +698,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster( /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster(params Elastic.Clients.Elasticsearch.Security.ClusterPrivilege[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Cluster(params Elastic.Clients.Elasticsearch.Security.ClusterPrivilege[] values) { Instance.Cluster = [.. values]; return this; @@ -709,7 +709,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Cluster( /// Optional description of the role descriptor /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Description(string? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Description(string? value) { Instance.Description = value; return this; @@ -720,7 +720,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Descript /// An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(System.Collections.Generic.ICollection? value) { Instance.Global = value; return this; @@ -731,7 +731,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(S /// An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(params Elastic.Clients.Elasticsearch.Security.GlobalPrivilege[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(params Elastic.Clients.Elasticsearch.Security.GlobalPrivilege[] values) { Instance.Global = [.. values]; return this; @@ -742,7 +742,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(p /// An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Global(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -759,7 +759,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Global(p /// A list of indices permissions entries. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(System.Collections.Generic.ICollection? value) { Instance.Indices = value; return this; @@ -770,7 +770,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices( /// A list of indices permissions entries. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(params Elastic.Clients.Elasticsearch.Security.IndicesPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(params Elastic.Clients.Elasticsearch.Security.IndicesPrivileges[] values) { Instance.Indices = [.. values]; return this; @@ -781,7 +781,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices( /// A list of indices permissions entries. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -798,7 +798,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices( /// A list of indices permissions entries. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices(params System.Action>[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Indices(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -815,7 +815,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Indices< /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata(System.Collections.Generic.IDictionary? value) { Instance.Metadata = value; return this; @@ -826,7 +826,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata() + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata() { Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); return this; @@ -837,13 +837,13 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Metadata(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Metadata(System.Action? action) { Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddMetadatum(string key, object value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor AddMetadatum(string key, object value) { Instance.Metadata ??= new System.Collections.Generic.Dictionary(); Instance.Metadata.Add(key, value); @@ -856,7 +856,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddMetad /// NOTE: This is limited a subset of the cluster permissions. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(System.Collections.Generic.ICollection? value) { Instance.RemoteCluster = value; return this; @@ -868,7 +868,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCl /// NOTE: This is limited a subset of the cluster permissions. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(params Elastic.Clients.Elasticsearch.Security.RemoteClusterPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(params Elastic.Clients.Elasticsearch.Security.RemoteClusterPrivileges[] values) { Instance.RemoteCluster = [.. values]; return this; @@ -880,7 +880,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCl /// NOTE: This is limited a subset of the cluster permissions. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCluster(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteCluster(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -897,7 +897,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteCl /// A list of indices permissions for remote clusters. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(System.Collections.Generic.ICollection? value) { Instance.RemoteIndices = value; return this; @@ -908,7 +908,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIn /// A list of indices permissions for remote clusters. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(params Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(params Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges[] values) { Instance.RemoteIndices = [.. values]; return this; @@ -919,7 +919,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIn /// A list of indices permissions for remote clusters. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(params System.Action[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(params System.Action[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -936,7 +936,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIn /// A list of indices permissions for remote clusters. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIndices(params System.Action>[] actions) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RemoteIndices(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); foreach (var action in actions) @@ -953,7 +953,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RemoteIn /// Restriction for when the role descriptor is allowed to be effective. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restriction(Elastic.Clients.Elasticsearch.Security.Restriction? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Security.Restriction? value) { Instance.Restriction = value; return this; @@ -964,7 +964,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restrict /// Restriction for when the role descriptor is allowed to be effective. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restriction(System.Action action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor Restriction(System.Action action) { Instance.Restriction = Elastic.Clients.Elasticsearch.Security.RestrictionDescriptor.Build(action); return this; @@ -977,7 +977,7 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor Restrict /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RunAs(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RunAs(System.Collections.Generic.ICollection? value) { Instance.RunAs = value; return this; @@ -990,31 +990,31 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RunAs(Sy /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor RunAs(params string[] values) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor RunAs(params string[] values) { Instance.RunAs = [.. values]; return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata(System.Collections.Generic.IDictionary? value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata(System.Collections.Generic.IDictionary? value) { Instance.TransientMetadata = value; return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata() + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata() { Instance.TransientMetadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor TransientMetadata(System.Action? action) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor TransientMetadata(System.Action? action) { Instance.TransientMetadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); return this; } - public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddTransientMetadatum(string key, object value) + public Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor AddTransientMetadatum(string key, object value) { Instance.TransientMetadata ??= new System.Collections.Generic.Dictionary(); Instance.TransientMetadata.Add(key, value); @@ -1022,14 +1022,14 @@ public Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor AddTrans } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Security.RoleDescriptorx Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.Security.RoleDescriptor Build(System.Action? action) { if (action is null) { - return new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + return new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); } - var builder = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorxDescriptor(new Elastic.Clients.Elasticsearch.Security.RoleDescriptorx(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + var builder = new Elastic.Clients.Elasticsearch.Security.RoleDescriptorDescriptor(new Elastic.Clients.Elasticsearch.Security.RoleDescriptor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleInfo.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleInfo.g.cs index ed339b9f49..45e534f662 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleInfo.g.cs @@ -23,7 +23,7 @@ namespace Elastic.Clients.Elasticsearch.Security; -internal sealed partial class RoleConverter : System.Text.Json.Serialization.JsonConverter +internal sealed partial class RoleInfoConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropApplications = System.Text.Json.JsonEncodedText.Encode("applications"); private static readonly System.Text.Json.JsonEncodedText PropCluster = System.Text.Json.JsonEncodedText.Encode("cluster"); @@ -37,7 +37,7 @@ internal sealed partial class RoleConverter : System.Text.Json.Serialization.Jso private static readonly System.Text.Json.JsonEncodedText PropRunAs = System.Text.Json.JsonEncodedText.Encode("run_as"); private static readonly System.Text.Json.JsonEncodedText PropTransientMetadata = System.Text.Json.JsonEncodedText.Encode("transient_metadata"); - public override Elastic.Clients.Elasticsearch.Security.Role Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Security.RoleInfo Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue> propApplications = default; @@ -118,7 +118,7 @@ public override Elastic.Clients.Elasticsearch.Security.Role Read(ref System.Text } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Security.Role(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + return new Elastic.Clients.Elasticsearch.Security.RoleInfo(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Applications = propApplications.Value, Cluster = propCluster.Value, @@ -134,7 +134,7 @@ public override Elastic.Clients.Elasticsearch.Security.Role Read(ref System.Text }; } - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.Role value, System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RoleInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); writer.WriteProperty(options, PropApplications, value.Applications, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); @@ -152,11 +152,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } } -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.RoleConverter))] -public sealed partial class Role +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.RoleInfoConverter))] +public sealed partial class RoleInfo { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public Role(System.Collections.Generic.IReadOnlyCollection applications, System.Collections.Generic.IReadOnlyCollection cluster, System.Collections.Generic.IReadOnlyCollection indices, System.Collections.Generic.IReadOnlyDictionary metadata) + public RoleInfo(System.Collections.Generic.IReadOnlyCollection applications, System.Collections.Generic.IReadOnlyCollection cluster, System.Collections.Generic.IReadOnlyCollection indices, System.Collections.Generic.IReadOnlyDictionary metadata) { Applications = applications; Cluster = cluster; @@ -164,18 +164,18 @@ public Role(System.Collections.Generic.IReadOnlyCollection /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 + /// Synonyms, in Solr format, that conform the synonym rule. /// /// public