Skip to content

[9.1] Regenerate client #8639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025
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 @@ -139,6 +139,7 @@ internal static class ApiUrlLookup
internal static ApiUrls IndexManagementRecovery = new ApiUrls(new[] { "_recovery", "{index}/_recovery" });
internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "_refresh", "{index}/_refresh" });
internal static ApiUrls IndexManagementReloadSearchAnalyzers = new ApiUrls(new[] { "{index}/_reload_search_analyzers" });
internal static ApiUrls IndexManagementRemoveBlock = new ApiUrls(new[] { "{index}/_block/{block}" });
internal static ApiUrls IndexManagementResolveCluster = new ApiUrls(new[] { "_resolve/cluster", "_resolve/cluster/{name}" });
internal static ApiUrls IndexManagementResolveIndex = new ApiUrls(new[] { "_resolve/index/{name}" });
internal static ApiUrls IndexManagementRollover = new ApiUrls(new[] { "{alias}/_rollover", "{alias}/_rollover/{new_index}" });
Expand All @@ -159,10 +160,13 @@ internal static class ApiUrlLookup
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}" });
internal static ApiUrls InferencePutAmazonsagemaker = new ApiUrls(new[] { "_inference/{task_type}/{amazonsagemaker_inference_id}" });
internal static ApiUrls InferencePutAnthropic = new ApiUrls(new[] { "_inference/{task_type}/{anthropic_inference_id}" });
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 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}" });
internal static ApiUrls InferencePutElser = new ApiUrls(new[] { "_inference/{task_type}/{elser_inference_id}" });
internal static ApiUrls InferencePutGoogleaistudio = new ApiUrls(new[] { "_inference/{task_type}/{googleaistudio_inference_id}" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ internal sealed partial class ClusterStatsResponseConverter : System.Text.Json.S
private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("indices");
private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("nodes");
private static readonly System.Text.Json.JsonEncodedText PropNodeStats = System.Text.Json.JsonEncodedText.Encode("_nodes");
private static readonly System.Text.Json.JsonEncodedText PropRepositories = System.Text.Json.JsonEncodedText.Encode("repositories");
private static readonly System.Text.Json.JsonEncodedText PropSnapshots = System.Text.Json.JsonEncodedText.Encode("snapshots");
private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status");
private static readonly System.Text.Json.JsonEncodedText PropTimestamp = System.Text.Json.JsonEncodedText.Encode("timestamp");

Expand All @@ -43,7 +45,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
LocalJsonValue<Elastic.Clients.Elasticsearch.Cluster.ClusterIndices> propIndices = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Cluster.ClusterNodes> propNodes = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.NodeStatistics?> propNodeStats = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.HealthStatus> propStatus = default;
LocalJsonValue<System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IReadOnlyDictionary<string, long>>> propRepositories = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats> propSnapshots = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.HealthStatus?> propStatus = default;
LocalJsonValue<long> propTimestamp = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
Expand Down Expand Up @@ -77,7 +81,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
continue;
}

if (propStatus.TryReadProperty(ref reader, options, PropStatus, null))
if (propRepositories.TryReadProperty(ref reader, options, PropRepositories, static System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IReadOnlyDictionary<string, long>> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue<string, System.Collections.Generic.IReadOnlyDictionary<string, long>>(o, null, static System.Collections.Generic.IReadOnlyDictionary<string, long> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue<string, long>(o, null, null)!)!))
{
continue;
}

if (propSnapshots.TryReadProperty(ref reader, options, PropSnapshots, null))
{
continue;
}

if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.HealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<Elastic.Clients.Elasticsearch.HealthStatus>(o)))
{
continue;
}
Expand Down Expand Up @@ -105,6 +119,8 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
Indices = propIndices.Value,
Nodes = propNodes.Value,
NodeStats = propNodeStats.Value,
Repositories = propRepositories.Value,
Snapshots = propSnapshots.Value,
Status = propStatus.Value,
Timestamp = propTimestamp.Value
};
Expand All @@ -119,7 +135,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
writer.WriteProperty(options, PropIndices, value.Indices, null, null);
writer.WriteProperty(options, PropNodes, value.Nodes, null, null);
writer.WriteProperty(options, PropNodeStats, value.NodeStats, null, null);
writer.WriteProperty(options, PropStatus, value.Status, null, null);
writer.WriteProperty(options, PropRepositories, value.Repositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IReadOnlyDictionary<string, long>> v) => w.WriteDictionaryValue<string, System.Collections.Generic.IReadOnlyDictionary<string, long>>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary<string, long> v) => w.WriteDictionaryValue<string, long>(o, v, null, null)));
writer.WriteProperty(options, PropSnapshots, value.Snapshots, null, null);
writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.HealthStatus? v) => w.WriteNullableValue<Elastic.Clients.Elasticsearch.HealthStatus>(o, v));
writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null);
writer.WriteEndObject();
}
Expand Down Expand Up @@ -203,14 +221,32 @@ internal ClusterStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo

/// <summary>
/// <para>
/// Health status of the cluster, based on the state of its primary and replica shards.
/// Contains stats on repository feature usage exposed in cluster stats for telemetry.
/// </para>
/// </summary>
public
#if NET7_0_OR_GREATER
required
#endif
System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IReadOnlyDictionary<string, long>> Repositories { get; set; }

/// <summary>
/// <para>
/// Contains stats cluster snapshots.
/// </para>
/// </summary>
public
#if NET7_0_OR_GREATER
required
#endif
Elastic.Clients.Elasticsearch.HealthStatus Status { get; set; }
Elastic.Clients.Elasticsearch.Cluster.ClusterSnapshotStats Snapshots { get; set; }

/// <summary>
/// <para>
/// Health status of the cluster, based on the state of its primary and replica shards.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.HealthStatus? Status { get; set; }

/// <summary>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public sealed partial class GetComponentTemplateRequestParameters : Elastic.Tran
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
/// </para>
/// </summary>
public System.Collections.Generic.ICollection<string>? SettingsFilter { get => Q<System.Collections.Generic.ICollection<string>?>("settings_filter"); set => Q("settings_filter", value); }
}

internal sealed partial class GetComponentTemplateRequestConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequest>
Expand Down Expand Up @@ -158,6 +165,13 @@ internal GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serialization
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
/// </para>
/// </summary>
public System.Collections.Generic.ICollection<string>? SettingsFilter { get => Q<System.Collections.Generic.ICollection<string>?>("settings_filter"); set => Q("settings_filter", value); }
}

/// <summary>
Expand Down Expand Up @@ -247,6 +261,28 @@ public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescript
return this;
}

/// <summary>
/// <para>
/// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescriptor SettingsFilter(System.Collections.Generic.ICollection<string>? value)
{
Instance.SettingsFilter = value;
return this;
}

/// <summary>
/// <para>
/// Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescriptor SettingsFilter(params string[] values)
{
Instance.SettingsFilter = [.. values];
return this;
}

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
internal static Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequest Build(System.Action<Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescriptor>? action)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ namespace Elastic.Clients.Elasticsearch.Cluster;

public sealed partial class PutComponentTemplateRequestParameters : Elastic.Transport.RequestParameters
{
/// <summary>
/// <para>
/// User defined reason for create the component template.
/// </para>
/// </summary>
public string? Cause { get => Q<string?>("cause"); set => Q("cause", value); }

/// <summary>
/// <para>
/// If <c>true</c>, this request cannot replace or update existing component templates.
Expand Down Expand Up @@ -185,6 +192,13 @@ internal PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serialization
#endif
Elastic.Clients.Elasticsearch.Name Name { get => P<Elastic.Clients.Elasticsearch.Name>("name"); set => PR("name", value); }

/// <summary>
/// <para>
/// User defined reason for create the component template.
/// </para>
/// </summary>
public string? Cause { get => Q<string?>("cause"); set => Q("cause", value); }

/// <summary>
/// <para>
/// If <c>true</c>, this request cannot replace or update existing component templates.
Expand Down Expand Up @@ -310,6 +324,17 @@ public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescript
return this;
}

/// <summary>
/// <para>
/// User defined reason for create the component template.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescriptor Cause(string? value)
{
Instance.Cause = value;
return this;
}

/// <summary>
/// <para>
/// If <c>true</c>, this request cannot replace or update existing component templates.
Expand Down Expand Up @@ -573,6 +598,17 @@ public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescript
return this;
}

/// <summary>
/// <para>
/// User defined reason for create the component template.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequestDescriptor<TDocument> Cause(string? value)
{
Instance.Cause = value;
return this;
}

/// <summary>
/// <para>
/// If <c>true</c>, this request cannot replace or update existing component templates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,13 @@ namespace Elastic.Clients.Elasticsearch;

public sealed partial class CreateRequestParameters : Elastic.Transport.RequestParameters
{
/// <summary>
/// <para>
/// Only perform the operation if the document has this primary term.
/// </para>
/// </summary>
public long? IfPrimaryTerm { get => Q<long?>("if_primary_term"); set => Q("if_primary_term", value); }

/// <summary>
/// <para>
/// Only perform the operation if the document has this sequence number.
/// </para>
/// </summary>
public long? IfSeqNo { get => Q<long?>("if_seq_no"); set => Q("if_seq_no", value); }

/// <summary>
/// <para>
/// True or false if to include the document source in the error message in case of parsing errors.
/// </para>
/// </summary>
public bool? IncludeSourceOnError { get => Q<bool?>("include_source_on_error"); set => Q("include_source_on_error", value); }

/// <summary>
/// <para>
/// Set to <c>create</c> to only index the document if it does not already exist (put if absent).
/// If a document with the specified <c>_id</c> already exists, the indexing operation will fail.
/// The behavior is the same as using the <c>&lt;index>/_create</c> endpoint.
/// If a document ID is specified, this paramater defaults to <c>index</c>.
/// Otherwise, it defaults to <c>create</c>.
/// If the request targets a data stream, an <c>op_type</c> of <c>create</c> is required.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.OpType? OpType { get => Q<Elastic.Clients.Elasticsearch.OpType?>("op_type"); set => Q("op_type", value); }

/// <summary>
/// <para>
/// The ID of the pipeline to use to preprocess incoming documents.
Expand Down Expand Up @@ -337,39 +311,13 @@ internal CreateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct
#endif
Elastic.Clients.Elasticsearch.IndexName Index { get => P<Elastic.Clients.Elasticsearch.IndexName>("index"); set => PR("index", value); }

/// <summary>
/// <para>
/// Only perform the operation if the document has this primary term.
/// </para>
/// </summary>
public long? IfPrimaryTerm { get => Q<long?>("if_primary_term"); set => Q("if_primary_term", value); }

/// <summary>
/// <para>
/// Only perform the operation if the document has this sequence number.
/// </para>
/// </summary>
public long? IfSeqNo { get => Q<long?>("if_seq_no"); set => Q("if_seq_no", value); }

/// <summary>
/// <para>
/// True or false if to include the document source in the error message in case of parsing errors.
/// </para>
/// </summary>
public bool? IncludeSourceOnError { get => Q<bool?>("include_source_on_error"); set => Q("include_source_on_error", value); }

/// <summary>
/// <para>
/// Set to <c>create</c> to only index the document if it does not already exist (put if absent).
/// If a document with the specified <c>_id</c> already exists, the indexing operation will fail.
/// The behavior is the same as using the <c>&lt;index>/_create</c> endpoint.
/// If a document ID is specified, this paramater defaults to <c>index</c>.
/// Otherwise, it defaults to <c>create</c>.
/// If the request targets a data stream, an <c>op_type</c> of <c>create</c> is required.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.OpType? OpType { get => Q<Elastic.Clients.Elasticsearch.OpType?>("op_type"); set => Q("op_type", value); }

/// <summary>
/// <para>
/// The ID of the pipeline to use to preprocess incoming documents.
Expand Down Expand Up @@ -619,28 +567,6 @@ public Elastic.Clients.Elasticsearch.CreateRequestDescriptor<TDocument> Index(El
return this;
}

/// <summary>
/// <para>
/// Only perform the operation if the document has this primary term.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.CreateRequestDescriptor<TDocument> IfPrimaryTerm(long? value)
{
Instance.IfPrimaryTerm = value;
return this;
}

/// <summary>
/// <para>
/// Only perform the operation if the document has this sequence number.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.CreateRequestDescriptor<TDocument> IfSeqNo(long? value)
{
Instance.IfSeqNo = value;
return this;
}

/// <summary>
/// <para>
/// True or false if to include the document source in the error message in case of parsing errors.
Expand All @@ -652,22 +578,6 @@ public Elastic.Clients.Elasticsearch.CreateRequestDescriptor<TDocument> IncludeS
return this;
}

/// <summary>
/// <para>
/// Set to <c>create</c> to only index the document if it does not already exist (put if absent).
/// If a document with the specified <c>_id</c> already exists, the indexing operation will fail.
/// The behavior is the same as using the <c>&lt;index>/_create</c> endpoint.
/// If a document ID is specified, this paramater defaults to <c>index</c>.
/// Otherwise, it defaults to <c>create</c>.
/// If the request targets a data stream, an <c>op_type</c> of <c>create</c> is required.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.CreateRequestDescriptor<TDocument> OpType(Elastic.Clients.Elasticsearch.OpType? value)
{
Instance.OpType = value;
return this;
}

/// <summary>
/// <para>
/// The ID of the pipeline to use to preprocess incoming documents.
Expand Down
Loading
Loading