Skip to content

Regenerate client using the latest specification #8369

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
Sep 30, 2024
Merged
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
@@ -145,6 +145,14 @@ public sealed partial class HealthResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("timed_out")]
public bool TimedOut { get; init; }

/// <summary>
/// <para>
/// The number of primary shards that are not allocated.
/// </para>
/// </summary>
[JsonInclude, JsonPropertyName("unassigned_primary_shards")]
public int UnassignedPrimaryShards { get; init; }

/// <summary>
/// <para>
/// The number of shards that are not allocated.
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ public sealed partial class EsqlQueryRequestParameters : RequestParameters
/// A short version of the Accept header, e.g. json, yaml.
/// </para>
/// </summary>
public string? Format { get => Q<string?>("format"); set => Q("format", value); }
public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q<Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat?>("format"); set => Q("format", value); }
}

/// <summary>
@@ -92,7 +92,7 @@ public sealed partial class EsqlQueryRequest : PlainRequest<EsqlQueryRequestPara
/// </para>
/// </summary>
[JsonIgnore]
public string? Format { get => Q<string?>("format"); set => Q("format", value); }
public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q<Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat?>("format"); set => Q("format", value); }

/// <summary>
/// <para>
@@ -163,7 +163,7 @@ public EsqlQueryRequestDescriptor()

public EsqlQueryRequestDescriptor<TDocument> Delimiter(string? delimiter) => Qs("delimiter", delimiter);
public EsqlQueryRequestDescriptor<TDocument> DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
public EsqlQueryRequestDescriptor<TDocument> Format(string? format) => Qs("format", format);
public EsqlQueryRequestDescriptor<TDocument> Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format);

private bool? ColumnarValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; }
@@ -328,7 +328,7 @@ public EsqlQueryRequestDescriptor()

public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter);
public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
public EsqlQueryRequestDescriptor Format(string? format) => Qs("format", format);
public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format);

private bool? ColumnarValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; }
Original file line number Diff line number Diff line change
@@ -52,6 +52,13 @@ public sealed partial class GetDataStreamRequestParameters : RequestParameters
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Whether the maximum timestamp for each data stream should be calculated and returned.
/// </para>
/// </summary>
public bool? Verbose { get => Q<bool?>("verbose"); set => Q("verbose", value); }
}

/// <summary>
@@ -102,6 +109,14 @@ public GetDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamN
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Whether the maximum timestamp for each data stream should be calculated and returned.
/// </para>
/// </summary>
[JsonIgnore]
public bool? Verbose { get => Q<bool?>("verbose"); set => Q("verbose", value); }
}

/// <summary>
@@ -133,6 +148,7 @@ public GetDataStreamRequestDescriptor()
public GetDataStreamRequestDescriptor ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public GetDataStreamRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults);
public GetDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
public GetDataStreamRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose);

public GetDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name)
{
Original file line number Diff line number Diff line change
@@ -31,6 +31,15 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;

public sealed partial class ResolveIndexRequestParameters : RequestParameters
{
/// <summary>
/// <para>
/// If <c>false</c>, the request returns an error if any wildcard expression, index alias, or <c>_all</c> value targets only missing or closed indices.
/// This behavior applies even if the request targets other open indices.
/// For example, a request targeting <c>foo*,bar*</c> returns an error if an index starts with <c>foo</c> but no index starts with <c>bar</c>.
/// </para>
/// </summary>
public bool? AllowNoIndices { get => Q<bool?>("allow_no_indices"); set => Q("allow_no_indices", value); }

/// <summary>
/// <para>
/// Type of index that wildcard patterns can match.
@@ -40,6 +49,13 @@ public sealed partial class ResolveIndexRequestParameters : RequestParameters
/// </para>
/// </summary>
public ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? ExpandWildcards { get => Q<ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>?>("expand_wildcards"); set => Q("expand_wildcards", value); }

/// <summary>
/// <para>
/// If <c>false</c>, the request returns an error if it targets a missing or closed index.
/// </para>
/// </summary>
public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }
}

/// <summary>
@@ -62,6 +78,16 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Names name)

internal override string OperationName => "indices.resolve_index";

/// <summary>
/// <para>
/// If <c>false</c>, the request returns an error if any wildcard expression, index alias, or <c>_all</c> value targets only missing or closed indices.
/// This behavior applies even if the request targets other open indices.
/// For example, a request targeting <c>foo*,bar*</c> returns an error if an index starts with <c>foo</c> but no index starts with <c>bar</c>.
/// </para>
/// </summary>
[JsonIgnore]
public bool? AllowNoIndices { get => Q<bool?>("allow_no_indices"); set => Q("allow_no_indices", value); }

/// <summary>
/// <para>
/// Type of index that wildcard patterns can match.
@@ -72,6 +98,14 @@ public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Names name)
/// </summary>
[JsonIgnore]
public ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? ExpandWildcards { get => Q<ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>?>("expand_wildcards"); set => Q("expand_wildcards", value); }

/// <summary>
/// <para>
/// If <c>false</c>, the request returns an error if it targets a missing or closed index.
/// </para>
/// </summary>
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }
}

/// <summary>
@@ -96,7 +130,9 @@ public ResolveIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Na

internal override string OperationName => "indices.resolve_index";

public ResolveIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public ResolveIndexRequestDescriptor ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public ResolveIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);

public ResolveIndexRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name)
{
Original file line number Diff line number Diff line change
@@ -97,6 +97,15 @@ public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("timeout"); set => Q("timeout", value); }

/// <summary>
/// <para>
/// Marks this ingest pipeline as deprecated.
/// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.
/// </para>
/// </summary>
[JsonInclude, JsonPropertyName("deprecated")]
public bool? Deprecated { get; set; }

/// <summary>
/// <para>
/// Description of the ingest pipeline.
@@ -170,6 +179,7 @@ public PutPipelineRequestDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.
return Self;
}

private bool? DeprecatedValue { get; set; }
private string? DescriptionValue { get; set; }
private IDictionary<string, object>? MetaValue { get; set; }
private ICollection<Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor>? OnFailureValue { get; set; }
@@ -182,6 +192,18 @@ public PutPipelineRequestDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.
private Action<Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor<TDocument>>[] ProcessorsDescriptorActions { get; set; }
private long? VersionValue { get; set; }

/// <summary>
/// <para>
/// Marks this ingest pipeline as deprecated.
/// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.
/// </para>
/// </summary>
public PutPipelineRequestDescriptor<TDocument> Deprecated(bool? deprecated = true)
{
DeprecatedValue = deprecated;
return Self;
}

/// <summary>
/// <para>
/// Description of the ingest pipeline.
@@ -300,6 +322,12 @@ public PutPipelineRequestDescriptor<TDocument> Version(long? version)
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
if (DeprecatedValue.HasValue)
{
writer.WritePropertyName("deprecated");
writer.WriteBooleanValue(DeprecatedValue.Value);
}

if (!string.IsNullOrEmpty(DescriptionValue))
{
writer.WritePropertyName("description");
@@ -416,6 +444,7 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.
return Self;
}

private bool? DeprecatedValue { get; set; }
private string? DescriptionValue { get; set; }
private IDictionary<string, object>? MetaValue { get; set; }
private ICollection<Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor>? OnFailureValue { get; set; }
@@ -428,6 +457,18 @@ public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.
private Action<Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor>[] ProcessorsDescriptorActions { get; set; }
private long? VersionValue { get; set; }

/// <summary>
/// <para>
/// Marks this ingest pipeline as deprecated.
/// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.
/// </para>
/// </summary>
public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true)
{
DeprecatedValue = deprecated;
return Self;
}

/// <summary>
/// <para>
/// Description of the ingest pipeline.
@@ -546,6 +587,12 @@ public PutPipelineRequestDescriptor Version(long? version)
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
if (DeprecatedValue.HasValue)
{
writer.WritePropertyName("deprecated");
writer.WriteBooleanValue(DeprecatedValue.Value);
}

if (!string.IsNullOrEmpty(DescriptionValue))
{
writer.WritePropertyName("description");
Loading