Skip to content

Commit

Permalink
Regenerate client using the latest specification (#8369) (#8371)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Bernd <[email protected]>
  • Loading branch information
github-actions[bot] and flobernd authored Sep 30, 2024
1 parent f9d28ca commit 209187c
Show file tree
Hide file tree
Showing 211 changed files with 8,948 additions and 2,868 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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>
Expand All @@ -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.
Expand All @@ -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>
Expand All @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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; }
Expand All @@ -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.
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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; }
Expand All @@ -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.
Expand Down Expand Up @@ -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");
Expand Down
Loading

0 comments on commit 209187c

Please sign in to comment.