Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ internal static class ApiUrlLookup
internal static ApiUrls InferencePutAzureaistudio = new ApiUrls(new[] { "_inference/{task_type}/{azureaistudio_inference_id}" });
internal static ApiUrls InferencePutAzureopenai = new ApiUrls(new[] { "_inference/{task_type}/{azureopenai_inference_id}" });
internal static ApiUrls InferencePutCohere = new ApiUrls(new[] { "_inference/{task_type}/{cohere_inference_id}" });
internal static ApiUrls InferencePutContextualai = new ApiUrls(new[] { "_inference/{task_type}/{contextualai_inference_id}" });
internal static ApiUrls InferencePutCustom = new ApiUrls(new[] { "_inference/{task_type}/{custom_inference_id}" });
internal static ApiUrls InferencePutDeepseek = new ApiUrls(new[] { "_inference/{task_type}/{deepseek_inference_id}" });
internal static ApiUrls InferencePutElasticsearch = new ApiUrls(new[] { "_inference/{task_type}/{elasticsearch_inference_id}" });
Expand Down Expand Up @@ -391,6 +392,7 @@ internal static class ApiUrlLookup
internal static ApiUrls SecurityGetServiceAccounts = new ApiUrls(new[] { "_security/service/{namespace}/{service}", "_security/service/{namespace}", "_security/service" });
internal static ApiUrls SecurityGetServiceCredentials = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential" });
internal static ApiUrls SecurityGetSettings = new ApiUrls(new[] { "_security/settings" });
internal static ApiUrls SecurityGetStats = new ApiUrls(new[] { "_security/stats" });
internal static ApiUrls SecurityGetToken = new ApiUrls(new[] { "_security/oauth2/token" });
internal static ApiUrls SecurityGetUser = new ApiUrls(new[] { "_security/user/{username}", "_security/user" });
internal static ApiUrls SecurityGetUserPrivileges = new ApiUrls(new[] { "_security/user/_privileges" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public sealed partial class CountRequestParameters : Elastic.Transport.RequestPa

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -227,7 +227,7 @@ internal CountRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -419,7 +419,7 @@ public Elastic.Clients.Elasticsearch.CountRequestDescriptor AnalyzeWildcard(bool

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -751,7 +751,7 @@ public Elastic.Clients.Elasticsearch.CountRequestDescriptor<TDocument> AnalyzeWi

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public sealed partial class DeleteByQueryRequestParameters : Elastic.Transport.R

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -466,7 +466,7 @@ internal DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -915,7 +915,7 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Conflicts(El

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -1645,7 +1645,7 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> C

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public sealed partial class ExplainRequestParameters : Elastic.Transport.Request

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -195,7 +195,7 @@ internal ExplainRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -360,7 +360,7 @@ public Elastic.Clients.Elasticsearch.ExplainRequestDescriptor AnalyzeWildcard(bo

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down Expand Up @@ -721,7 +721,7 @@ public Elastic.Clients.Elasticsearch.ExplainRequestDescriptor<TDocument> Analyze

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// This parameter can be used only when the <c>q</c> query string parameter is specified.
/// </para>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public sealed partial class IndicesStatsRequestParameters : Elastic.Transport.Re

/// <summary>
/// <para>
/// Indicates whether statistics are aggregated at the cluster, index, or shard level.
/// Indicates whether statistics are aggregated at the cluster, indices, or shards level.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Level? Level { get => Q<Elastic.Clients.Elasticsearch.Level?>("level"); set => Q("level", value); }
Expand Down Expand Up @@ -221,7 +221,7 @@ internal IndicesStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon

/// <summary>
/// <para>
/// Indicates whether statistics are aggregated at the cluster, index, or shard level.
/// Indicates whether statistics are aggregated at the cluster, indices, or shards level.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Level? Level { get => Q<Elastic.Clients.Elasticsearch.Level?>("level"); set => Q("level", value); }
Expand Down Expand Up @@ -449,7 +449,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndicesStatsRequestDescript

/// <summary>
/// <para>
/// Indicates whether statistics are aggregated at the cluster, index, or shard level.
/// Indicates whether statistics are aggregated at the cluster, indices, or shards level.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.IndicesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? value)
Expand Down Expand Up @@ -736,7 +736,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.IndicesStatsRequestDescript

/// <summary>
/// <para>
/// Indicates whether statistics are aggregated at the cluster, index, or shard level.
/// Indicates whether statistics are aggregated at the cluster, indices, or shards level.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.IndicesStatsRequestDescriptor<TDocument> Level(Elastic.Clients.Elasticsearch.Level? value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public sealed partial class ValidateQueryRequestParameters : Elastic.Transport.R

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q<Elastic.Clients.Elasticsearch.QueryDsl.Operator?>("default_operator"); set => Q("default_operator", value); }
Expand Down Expand Up @@ -192,7 +192,7 @@ internal ValidateQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q<Elastic.Clients.Elasticsearch.QueryDsl.Operator?>("default_operator"); set => Q("default_operator", value); }
Expand Down Expand Up @@ -347,7 +347,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.ValidateQueryRequestDescrip

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.ValidateQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? value)
Expand Down Expand Up @@ -628,7 +628,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.ValidateQueryRequestDescrip

/// <summary>
/// <para>
/// The default operator for query string query: <c>AND</c> or <c>OR</c>.
/// The default operator for query string query: <c>and</c> or <c>or</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.ValidateQueryRequestDescriptor<TDocument> DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? value)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// 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.Json;

public sealed partial class PutContextualaiRequestConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Inference.PutContextualaiRequest>
{
private static readonly System.Text.Json.JsonEncodedText PropChunkingSettings = System.Text.Json.JsonEncodedText.Encode("chunking_settings");
private static readonly System.Text.Json.JsonEncodedText PropService = System.Text.Json.JsonEncodedText.Encode("service");
private static readonly System.Text.Json.JsonEncodedText PropServiceSettings = System.Text.Json.JsonEncodedText.Encode("service_settings");
private static readonly System.Text.Json.JsonEncodedText PropTaskSettings = System.Text.Json.JsonEncodedText.Encode("task_settings");

public override Elastic.Clients.Elasticsearch.Inference.PutContextualaiRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings?> propChunkingSettings = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Inference.ContextualAIServiceSettings> propServiceSettings = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Inference.ContextualAITaskSettings?> propTaskSettings = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null))
{
continue;
}

if (reader.ValueTextEquals(PropService))
{
reader.SafeSkip();
continue;
}

if (propServiceSettings.TryReadProperty(ref reader, options, PropServiceSettings, null))
{
continue;
}

if (propTaskSettings.TryReadProperty(ref reader, options, PropTaskSettings, null))
{
continue;
}

if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
{
reader.SafeSkip();
continue;
}

throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
}

reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
return new Elastic.Clients.Elasticsearch.Inference.PutContextualaiRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
ChunkingSettings = propChunkingSettings.Value,
ServiceSettings = propServiceSettings.Value,
TaskSettings = propTaskSettings.Value
};
}

public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.PutContextualaiRequest value, System.Text.Json.JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteProperty(options, PropChunkingSettings, value.ChunkingSettings, null, null);
writer.WriteProperty(options, PropService, value.Service, null, null);
writer.WriteProperty(options, PropServiceSettings, value.ServiceSettings, null, null);
writer.WriteProperty(options, PropTaskSettings, value.TaskSettings, null, null);
writer.WriteEndObject();
}
}
Loading
Loading