Skip to content

Regenerate client #8596

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

Closed
wants to merge 1 commit into from
Closed
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 @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.FieldUsageStatsRes
}

propStats ??= new System.Collections.Generic.Dictionary<string, Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex>();
reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<string>(o)!, static Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex>(o)!);
reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<string>(o)!, null);
propStats[key] = value;
}

Expand Down
666 changes: 3 additions & 663 deletions src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,31 @@

namespace Elastic.Clients.Elasticsearch.Fluent;

public readonly partial struct FluentCollectionOfKeyValuePairOfStringFloat
public readonly partial struct FluentDictionaryOfStringFloat
{
private readonly System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, float>> _items = new();
private readonly System.Collections.Generic.Dictionary<string, float> _items = new();

private System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, float>> Value => _items;
private System.Collections.Generic.IDictionary<string, float> Value => _items;

public FluentCollectionOfKeyValuePairOfStringFloat()
public FluentDictionaryOfStringFloat()
{
}

public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringFloat Add(System.Collections.Generic.KeyValuePair<string, float> value)
public Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringFloat Add(string key, float value)
{
_items.Add(value);
return this;
}

public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringFloat Add(params System.Collections.Generic.KeyValuePair<string, float>[] values)
{
_items.AddRange(values);
return this;
}

public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringFloat Add(string key, float value)
{
_items.Add(new System.Collections.Generic.KeyValuePair<string, float>(key, value));
_items.Add(key, value);
return this;
}

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
internal static System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, float>> Build(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringFloat>? action)
internal static System.Collections.Generic.IDictionary<string, float> Build(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringFloat>? action)
{
if (action is null)
{
return [];
return new System.Collections.Generic.Dictionary<string, float>();
}

var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringFloat();
var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringFloat();
action.Invoke(builder);
return builder.Value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Aggregations;
internal sealed partial class BoxplotAggregationConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation>
{
private static readonly System.Text.Json.JsonEncodedText PropCompression = System.Text.Json.JsonEncodedText.Encode("compression");
private static readonly System.Text.Json.JsonEncodedText PropExecutionHint = System.Text.Json.JsonEncodedText.Encode("execution_hint");
private static readonly System.Text.Json.JsonEncodedText PropField = System.Text.Json.JsonEncodedText.Encode("field");
private static readonly System.Text.Json.JsonEncodedText PropMissing = System.Text.Json.JsonEncodedText.Encode("missing");
private static readonly System.Text.Json.JsonEncodedText PropScript = System.Text.Json.JsonEncodedText.Encode("script");
Expand All @@ -34,6 +35,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<double?> propCompression = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint?> propExecutionHint = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Field?> propField = default;
LocalJsonValue<object?> propMissing = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Script?> propScript = default;
Expand All @@ -44,6 +46,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re
continue;
}

if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o)))
{
continue;
}

if (propField.TryReadProperty(ref reader, options, PropField, null))
{
continue;
Expand Down Expand Up @@ -72,6 +79,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re
return new Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
Compression = propCompression.Value,
ExecutionHint = propExecutionHint.Value,
Field = propField.Value,
Missing = propMissing.Value,
Script = propScript.Value
Expand All @@ -82,6 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
{
writer.WriteStartObject();
writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue<double>(o, v));
writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? v) => w.WriteNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o, v));
writer.WriteProperty(options, PropField, value.Field, null, null);
writer.WriteProperty(options, PropMissing, value.Missing, null, null);
writer.WriteProperty(options, PropScript, value.Script, null, null);
Expand Down Expand Up @@ -115,6 +124,14 @@ internal BoxplotAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCons
/// </summary>
public double? Compression { get; set; }

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? ExecutionHint { get; set; }

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down Expand Up @@ -162,6 +179,18 @@ public Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregationDescriptor<T
return this;
}

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregationDescriptor<TDocument> ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? value)
{
Instance.ExecutionHint = value;
return this;
}

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down Expand Up @@ -258,6 +287,18 @@ public Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregationDescriptor C
return this;
}

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? value)
{
Instance.ExecutionHint = value;
return this;
}

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate Re
}

propData ??= new System.Collections.Generic.Dictionary<string, object>();
reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<string>(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<object>(o)!);
reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName<string>(o)!, null);
propData[key] = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Aggregations;
internal sealed partial class MedianAbsoluteDeviationAggregationConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregation>
{
private static readonly System.Text.Json.JsonEncodedText PropCompression = System.Text.Json.JsonEncodedText.Encode("compression");
private static readonly System.Text.Json.JsonEncodedText PropExecutionHint = System.Text.Json.JsonEncodedText.Encode("execution_hint");
private static readonly System.Text.Json.JsonEncodedText PropField = System.Text.Json.JsonEncodedText.Encode("field");
private static readonly System.Text.Json.JsonEncodedText PropFormat = System.Text.Json.JsonEncodedText.Encode("format");
private static readonly System.Text.Json.JsonEncodedText PropMissing = System.Text.Json.JsonEncodedText.Encode("missing");
Expand All @@ -35,6 +36,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<double?> propCompression = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint?> propExecutionHint = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Field?> propField = default;
LocalJsonValue<string?> propFormat = default;
LocalJsonValue<object?> propMissing = default;
Expand All @@ -46,6 +48,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati
continue;
}

if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o)))
{
continue;
}

if (propField.TryReadProperty(ref reader, options, PropField, null))
{
continue;
Expand Down Expand Up @@ -79,6 +86,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati
return new Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
Compression = propCompression.Value,
ExecutionHint = propExecutionHint.Value,
Field = propField.Value,
Format = propFormat.Value,
Missing = propMissing.Value,
Expand All @@ -90,6 +98,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
{
writer.WriteStartObject();
writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue<double>(o, v));
writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? v) => w.WriteNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o, v));
writer.WriteProperty(options, PropField, value.Field, null, null);
writer.WriteProperty(options, PropFormat, value.Format, null, null);
writer.WriteProperty(options, PropMissing, value.Missing, null, null);
Expand Down Expand Up @@ -124,6 +133,14 @@ internal MedianAbsoluteDeviationAggregation(Elastic.Clients.Elasticsearch.Serial
/// </summary>
public double? Compression { get; set; }

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? ExecutionHint { get; set; }

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down Expand Up @@ -172,6 +189,18 @@ public Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggrega
return this;
}

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregationDescriptor<TDocument> ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? value)
{
Instance.ExecutionHint = value;
return this;
}

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down Expand Up @@ -274,6 +303,18 @@ public Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggrega
return this;
}

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? value)
{
Instance.ExecutionHint = value;
return this;
}

/// <summary>
/// <para>
/// The field on which to run the aggregation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ namespace Elastic.Clients.Elasticsearch.Aggregations;
internal sealed partial class TDigestConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.Aggregations.TDigest>
{
private static readonly System.Text.Json.JsonEncodedText PropCompression = System.Text.Json.JsonEncodedText.Encode("compression");
private static readonly System.Text.Json.JsonEncodedText PropExecutionHint = System.Text.Json.JsonEncodedText.Encode("execution_hint");

public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<int?> propCompression = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint?> propExecutionHint = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
if (propCompression.TryReadProperty(ref reader, options, PropCompression, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<int>(o)))
{
continue;
}

if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o)))
{
continue;
}

if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
{
reader.Skip();
Expand All @@ -50,14 +57,16 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref Syst
reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
return new Elastic.Clients.Elasticsearch.Aggregations.TDigest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
Compression = propCompression.Value
Compression = propCompression.Value,
ExecutionHint = propExecutionHint.Value
};
}

public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TDigest value, System.Text.Json.JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue<int>(o, v));
writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? v) => w.WriteNullableValue<Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint>(o, v));
writer.WriteEndObject();
}
}
Expand Down Expand Up @@ -87,6 +96,14 @@ internal TDigest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent
/// </para>
/// </summary>
public int? Compression { get; set; }

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? ExecutionHint { get; set; }
}

public readonly partial struct TDigestDescriptor
Expand Down Expand Up @@ -119,6 +136,18 @@ public Elastic.Clients.Elasticsearch.Aggregations.TDigestDescriptor Compression(
return this;
}

/// <summary>
/// <para>
/// The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases).
/// To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Aggregations.TDigestDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.TDigestExecutionHint? value)
{
Instance.ExecutionHint = value;
return this;
}

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
internal static Elastic.Clients.Elasticsearch.Aggregations.TDigest Build(System.Action<Elastic.Clients.Elasticsearch.Aggregations.TDigestDescriptor>? action)
{
Expand Down
Loading
Loading