Skip to content

[Backport 8.17] Regenerate client using the latest specification #8442

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
Jan 2, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,15 @@ internal static class ApiUrlLookup
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 IngestDeleteGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database/{id}" });
internal static ApiUrls IngestDeleteIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database/{id}" });
internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" });
internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "_ingest/geoip/stats" });
internal static ApiUrls IngestGetGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database", "_ingest/geoip/database/{id}" });
internal static ApiUrls IngestGetIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database", "_ingest/ip_location/database/{id}" });
internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "_ingest/pipeline", "_ingest/pipeline/{id}" });
internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "_ingest/processor/grok" });
internal static ApiUrls IngestPutGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database/{id}" });
internal static ApiUrls IngestPutIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database/{id}" });
internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" });
internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "_ingest/pipeline/_simulate", "_ingest/pipeline/{id}/_simulate" });
internal static ApiUrls LicenseManagementGet = new ApiUrls(new[] { "_license" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch;

public sealed partial class AsyncSearchStatusRequestParameters : RequestParameters
{
/// <summary>
/// <para>
/// Specifies how long the async search needs to be available.
/// Ongoing async searches and any saved search results are deleted after this period.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("keep_alive"); set => Q("keep_alive", value); }
}

/// <summary>
Expand All @@ -56,6 +63,15 @@ public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Id id)
internal override bool SupportsBody => false;

internal override string OperationName => "async_search.status";

/// <summary>
/// <para>
/// Specifies how long the async search needs to be available.
/// Ongoing async searches and any saved search results are deleted after this period.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("keep_alive"); set => Q("keep_alive", value); }
}

/// <summary>
Expand Down Expand Up @@ -83,6 +99,8 @@ public AsyncSearchStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverle

internal override string OperationName => "async_search.status";

public AsyncSearchStatusRequestDescriptor<TDocument> KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive);

public AsyncSearchStatusRequestDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.Serverless.Id id)
{
RouteValues.Required("id", id);
Expand Down Expand Up @@ -119,6 +137,8 @@ public AsyncSearchStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverle

internal override string OperationName => "async_search.status";

public AsyncSearchStatusRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive);

public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id)
{
RouteValues.Required("id", id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete
/// </summary>
public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

/// <summary>
/// <para>
/// Specifies how long the async search needs to be available.
/// Ongoing async searches and any saved search results are deleted after this period.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("keep_alive"); set => Q("keep_alive", value); }

/// <summary>
/// <para>
/// If <c>true</c>, results are stored for later retrieval when the search completes within the <c>wait_for_completion_timeout</c>.
Expand Down Expand Up @@ -148,24 +140,23 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete

/// <summary>
/// <para>
/// The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped.
/// Query in the Lucene query string syntax
/// </para>
/// </summary>
public long? PreFilterShardSize { get => Q<long?>("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); }
public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }

/// <summary>
/// <para>
/// Query in the Lucene query string syntax
/// Specify if request cache should be used for this request or not, defaults to true
/// </para>
/// </summary>
public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }
public bool? RequestCache { get => Q<bool?>("request_cache"); set => Q("request_cache", value); }

/// <summary>
/// <para>
/// Specify if request cache should be used for this request or not, defaults to true
/// Indicates whether hits.total should be rendered as an integer or an object in the rest search response
/// </para>
/// </summary>
public bool? RequestCache { get => Q<bool?>("request_cache"); set => Q("request_cache", value); }
public bool? RestTotalHitsAsInt { get => Q<bool?>("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }

/// <summary>
Expand All @@ -174,7 +165,6 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Serverless.Routing?>("routing"); set => Q("routing", value); }
public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("scroll"); set => Q("scroll", value); }

/// <summary>
/// <para>
Expand Down Expand Up @@ -772,15 +762,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

/// <summary>
/// <para>
/// Specifies how long the async search needs to be available.
/// Ongoing async searches and any saved search results are deleted after this period.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("keep_alive"); set => Q("keep_alive", value); }

/// <summary>
/// <para>
/// If <c>true</c>, results are stored for later retrieval when the search completes within the <c>wait_for_completion_timeout</c>.
Expand Down Expand Up @@ -815,28 +796,26 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices

/// <summary>
/// <para>
/// The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped.
/// Query in the Lucene query string syntax
/// </para>
/// </summary>
[JsonIgnore]
public long? PreFilterShardSize { get => Q<long?>("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); }
public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }

/// <summary>
/// <para>
/// Query in the Lucene query string syntax
/// Specify if request cache should be used for this request or not, defaults to true
/// </para>
/// </summary>
[JsonIgnore]
public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }
public bool? RequestCache { get => Q<bool?>("request_cache"); set => Q("request_cache", value); }

/// <summary>
/// <para>
/// Specify if request cache should be used for this request or not, defaults to true
/// Indicates whether hits.total should be rendered as an integer or an object in the rest search response
/// </para>
/// </summary>
[JsonIgnore]
public bool? RequestCache { get => Q<bool?>("request_cache"); set => Q("request_cache", value); }
[JsonIgnore]
public bool? RestTotalHitsAsInt { get => Q<bool?>("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }

/// <summary>
Expand All @@ -846,8 +825,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Serverless.Routing?>("routing"); set => Q("routing", value); }
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("scroll"); set => Q("scroll", value); }

/// <summary>
/// <para>
Expand Down Expand Up @@ -1192,17 +1169,14 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor<TDocument> ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SubmitAsyncSearchRequestDescriptor<TDocument> IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public SubmitAsyncSearchRequestDescriptor<TDocument> IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public SubmitAsyncSearchRequestDescriptor<TDocument> KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public SubmitAsyncSearchRequestDescriptor<TDocument> KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
public SubmitAsyncSearchRequestDescriptor<TDocument> Lenient(bool? lenient = true) => Qs("lenient", lenient);
public SubmitAsyncSearchRequestDescriptor<TDocument> MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests);
public SubmitAsyncSearchRequestDescriptor<TDocument> Preference(string? preference) => Qs("preference", preference);
public SubmitAsyncSearchRequestDescriptor<TDocument> PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
public SubmitAsyncSearchRequestDescriptor<TDocument> QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor<TDocument> RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public SubmitAsyncSearchRequestDescriptor<TDocument> RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt);
public SubmitAsyncSearchRequestDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public SubmitAsyncSearchRequestDescriptor<TDocument> Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll);
public SubmitAsyncSearchRequestDescriptor<TDocument> SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType);
public SubmitAsyncSearchRequestDescriptor<TDocument> SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public SubmitAsyncSearchRequestDescriptor<TDocument> SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
Expand Down Expand Up @@ -2316,17 +2290,14 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SubmitAsyncSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public SubmitAsyncSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public SubmitAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public SubmitAsyncSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests);
public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference);
public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt);
public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll);
public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType);
public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ namespace Elastic.Clients.Elasticsearch.Serverless;

public sealed partial class BulkRequestParameters : RequestParameters
{
/// <summary>
/// <para>
/// If <c>true</c>, the response will include the ingest pipelines that were executed for each index or create.
/// </para>
/// </summary>
public bool? ListExecutedPipelines { get => Q<bool?>("list_executed_pipelines"); set => Q("list_executed_pipelines", value); }

/// <summary>
/// <para>
/// ID of the pipeline to use to preprocess incoming documents.
Expand All @@ -56,6 +63,13 @@ public sealed partial class BulkRequestParameters : RequestParameters
/// </summary>
public bool? RequireAlias { get => Q<bool?>("require_alias"); set => Q("require_alias", value); }

/// <summary>
/// <para>
/// If <c>true</c>, the request's actions must target a data stream (existing or to-be-created).
/// </para>
/// </summary>
public bool? RequireDataStream { get => Q<bool?>("require_data_stream"); set => Q("require_data_stream", value); }

/// <summary>
/// <para>
/// Custom value used to route operations to a specific shard.
Expand Down Expand Up @@ -125,6 +139,14 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) :

internal override string OperationName => "bulk";

/// <summary>
/// <para>
/// If <c>true</c>, the response will include the ingest pipelines that were executed for each index or create.
/// </para>
/// </summary>
[JsonIgnore]
public bool? ListExecutedPipelines { get => Q<bool?>("list_executed_pipelines"); set => Q("list_executed_pipelines", value); }

/// <summary>
/// <para>
/// ID of the pipeline to use to preprocess incoming documents.
Expand Down Expand Up @@ -152,6 +174,14 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) :
[JsonIgnore]
public bool? RequireAlias { get => Q<bool?>("require_alias"); set => Q("require_alias", value); }

/// <summary>
/// <para>
/// If <c>true</c>, the request's actions must target a data stream (existing or to-be-created).
/// </para>
/// </summary>
[JsonIgnore]
public bool? RequireDataStream { get => Q<bool?>("require_data_stream"); set => Q("require_data_stream", value); }

/// <summary>
/// <para>
/// Custom value used to route operations to a specific shard.
Expand Down Expand Up @@ -229,9 +259,11 @@ public BulkRequestDescriptor() : this(typeof(TDocument))

internal override string OperationName => "bulk";

public BulkRequestDescriptor<TDocument> ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines);
public BulkRequestDescriptor<TDocument> Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor<TDocument> Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor<TDocument> RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor<TDocument> RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream);
public BulkRequestDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public BulkRequestDescriptor<TDocument> Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor<TDocument> SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
Expand Down Expand Up @@ -279,9 +311,11 @@ public BulkRequestDescriptor()

internal override string OperationName => "bulk";

public BulkRequestDescriptor ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines);
public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream);
public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
Expand Down
Loading