Skip to content

Commit

Permalink
Regenerate client for 8.14
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Jun 6, 2024
1 parent 1aeff72 commit 655cb11
Show file tree
Hide file tree
Showing 26 changed files with 2,014 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions opt
break;
}

case "box_plot":
case "boxplot":
{
var item = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregate>(ref reader, options);
dictionary.Add(nameParts[1], item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
if (reader.TokenType != JsonTokenType.StartObject)
throw new JsonException("Unexpected JSON detected.");
long docCount = default;
long? docCountError = default;
long? docCountErrorUpperBound = default;
double key = default;
string? keyAsString = default;
Dictionary<string, Elastic.Clients.Elasticsearch.Serverless.Aggregations.IAggregate> additionalProperties = null;
Expand All @@ -49,9 +49,9 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
continue;
}

if (property == "doc_count_error")
if (property == "doc_count_error_upper_bound")
{
docCountError = JsonSerializer.Deserialize<long?>(ref reader, options);
docCountErrorUpperBound = JsonSerializer.Deserialize<long?>(ref reader, options);
continue;
}

Expand All @@ -78,7 +78,7 @@ public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
}
}

return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString };
return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString };
}

public override void Write(Utf8JsonWriter writer, DoubleTermsBucket value, JsonSerializerOptions options)
Expand All @@ -95,7 +95,7 @@ public sealed partial class DoubleTermsBucket
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; }
public long DocCount { get; init; }
public long? DocCountError { get; init; }
public long? DocCountErrorUpperBound { get; init; }
public double Key { get; init; }
public string? KeyAsString { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve
if (reader.TokenType != JsonTokenType.StartObject)
throw new JsonException("Unexpected JSON detected.");
long docCount = default;
long? docCountError = default;
long? docCountErrorUpperBound = default;
long key = default;
string? keyAsString = default;
Dictionary<string, Elastic.Clients.Elasticsearch.Serverless.Aggregations.IAggregate> additionalProperties = null;
Expand All @@ -49,9 +49,9 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve
continue;
}

if (property == "doc_count_error")
if (property == "doc_count_error_upper_bound")
{
docCountError = JsonSerializer.Deserialize<long?>(ref reader, options);
docCountErrorUpperBound = JsonSerializer.Deserialize<long?>(ref reader, options);
continue;
}

Expand All @@ -78,7 +78,7 @@ public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConve
}
}

return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key, KeyAsString = keyAsString };
return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString };
}

public override void Write(Utf8JsonWriter writer, LongTermsBucket value, JsonSerializerOptions options)
Expand All @@ -95,7 +95,7 @@ public sealed partial class LongTermsBucket
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; }
public long DocCount { get; init; }
public long? DocCountError { get; init; }
public long? DocCountErrorUpperBound { get; init; }
public long Key { get; init; }
public string? KeyAsString { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
if (reader.TokenType != JsonTokenType.StartObject)
throw new JsonException("Unexpected JSON detected.");
long docCount = default;
long? docCountError = default;
long? docCountErrorUpperBound = default;
Elastic.Clients.Elasticsearch.Serverless.FieldValue key = default;
Dictionary<string, Elastic.Clients.Elasticsearch.Serverless.Aggregations.IAggregate> additionalProperties = null;
while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
Expand All @@ -48,9 +48,9 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
continue;
}

if (property == "doc_count_error")
if (property == "doc_count_error_upper_bound")
{
docCountError = JsonSerializer.Deserialize<long?>(ref reader, options);
docCountErrorUpperBound = JsonSerializer.Deserialize<long?>(ref reader, options);
continue;
}

Expand All @@ -71,7 +71,7 @@ public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToCon
}
}

return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountError = docCountError, Key = key };
return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key };
}

public override void Write(Utf8JsonWriter writer, StringTermsBucket value, JsonSerializerOptions options)
Expand All @@ -88,6 +88,6 @@ public sealed partial class StringTermsBucket
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; }
public long DocCount { get; init; }
public long? DocCountError { get; init; }
public long? DocCountErrorUpperBound { get; init; }
public Elastic.Clients.Elasticsearch.Serverless.FieldValue Key { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter
{
[JsonInclude, JsonPropertyName("alternate")]
public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? Alternate { get; set; }
[JsonInclude, JsonPropertyName("caseFirst")]
public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? Casefirst { get; set; }
[JsonInclude, JsonPropertyName("caseLevel")]
public bool? Caselevel { get; set; }
[JsonInclude, JsonPropertyName("case_first")]
public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; }
[JsonInclude, JsonPropertyName("case_level")]
public bool? CaseLevel { get; set; }
[JsonInclude, JsonPropertyName("country")]
public string? Country { get; set; }
[JsonInclude, JsonPropertyName("decomposition")]
public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? Decomposition { get; set; }
[JsonInclude, JsonPropertyName("hiraganaQuaternaryMode")]
public bool? Hiraganaquaternarymode { get; set; }
[JsonInclude, JsonPropertyName("hiragana_quaternary_mode")]
public bool? HiraganaQuaternaryMode { get; set; }
[JsonInclude, JsonPropertyName("language")]
public string? Language { get; set; }
[JsonInclude, JsonPropertyName("numeric")]
Expand All @@ -53,8 +53,8 @@ public sealed partial class IcuCollationTokenFilter : ITokenFilter
[JsonInclude, JsonPropertyName("type")]
public string Type => "icu_collation";

[JsonInclude, JsonPropertyName("variableTop")]
public string? Variabletop { get; set; }
[JsonInclude, JsonPropertyName("variable_top")]
public string? VariableTop { get; set; }
[JsonInclude, JsonPropertyName("variant")]
public string? Variant { get; set; }
[JsonInclude, JsonPropertyName("version")]
Expand All @@ -70,16 +70,16 @@ public IcuCollationTokenFilterDescriptor() : base()
}

private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CasefirstValue { get; set; }
private bool? CaselevelValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; }
private bool? CaseLevelValue { get; set; }
private string? CountryValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; }
private bool? HiraganaquaternarymodeValue { get; set; }
private bool? HiraganaQuaternaryModeValue { get; set; }
private string? LanguageValue { get; set; }
private bool? NumericValue { get; set; }
private string? RulesValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; }
private string? VariabletopValue { get; set; }
private string? VariableTopValue { get; set; }
private string? VariantValue { get; set; }
private string? VersionValue { get; set; }

Expand All @@ -89,15 +89,15 @@ public IcuCollationTokenFilterDescriptor Alternate(Elastic.Clients.Elasticsearch
return Self;
}

public IcuCollationTokenFilterDescriptor Casefirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? casefirst)
public IcuCollationTokenFilterDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst)
{
CasefirstValue = casefirst;
CaseFirstValue = caseFirst;
return Self;
}

public IcuCollationTokenFilterDescriptor Caselevel(bool? caselevel = true)
public IcuCollationTokenFilterDescriptor CaseLevel(bool? caseLevel = true)
{
CaselevelValue = caselevel;
CaseLevelValue = caseLevel;
return Self;
}

Expand All @@ -113,9 +113,9 @@ public IcuCollationTokenFilterDescriptor Decomposition(Elastic.Clients.Elasticse
return Self;
}

public IcuCollationTokenFilterDescriptor Hiraganaquaternarymode(bool? hiraganaquaternarymode = true)
public IcuCollationTokenFilterDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true)
{
HiraganaquaternarymodeValue = hiraganaquaternarymode;
HiraganaQuaternaryModeValue = hiraganaQuaternaryMode;
return Self;
}

Expand Down Expand Up @@ -143,9 +143,9 @@ public IcuCollationTokenFilterDescriptor Strength(Elastic.Clients.Elasticsearch.
return Self;
}

public IcuCollationTokenFilterDescriptor Variabletop(string? variabletop)
public IcuCollationTokenFilterDescriptor VariableTop(string? variableTop)
{
VariabletopValue = variabletop;
VariableTopValue = variableTop;
return Self;
}

Expand All @@ -170,16 +170,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, AlternateValue, options);
}

if (CasefirstValue is not null)
if (CaseFirstValue is not null)
{
writer.WritePropertyName("caseFirst");
JsonSerializer.Serialize(writer, CasefirstValue, options);
writer.WritePropertyName("case_first");
JsonSerializer.Serialize(writer, CaseFirstValue, options);
}

if (CaselevelValue.HasValue)
if (CaseLevelValue.HasValue)
{
writer.WritePropertyName("caseLevel");
writer.WriteBooleanValue(CaselevelValue.Value);
writer.WritePropertyName("case_level");
writer.WriteBooleanValue(CaseLevelValue.Value);
}

if (!string.IsNullOrEmpty(CountryValue))
Expand All @@ -194,10 +194,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, DecompositionValue, options);
}

if (HiraganaquaternarymodeValue.HasValue)
if (HiraganaQuaternaryModeValue.HasValue)
{
writer.WritePropertyName("hiraganaQuaternaryMode");
writer.WriteBooleanValue(HiraganaquaternarymodeValue.Value);
writer.WritePropertyName("hiragana_quaternary_mode");
writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value);
}

if (!string.IsNullOrEmpty(LanguageValue))
Expand Down Expand Up @@ -226,10 +226,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o

writer.WritePropertyName("type");
writer.WriteStringValue("icu_collation");
if (!string.IsNullOrEmpty(VariabletopValue))
if (!string.IsNullOrEmpty(VariableTopValue))
{
writer.WritePropertyName("variableTop");
writer.WriteStringValue(VariabletopValue);
writer.WritePropertyName("variable_top");
writer.WriteStringValue(VariableTopValue);
}

if (!string.IsNullOrEmpty(VariantValue))
Expand All @@ -250,16 +250,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
IcuCollationTokenFilter IBuildableDescriptor<IcuCollationTokenFilter>.Build() => new()
{
Alternate = AlternateValue,
Casefirst = CasefirstValue,
Caselevel = CaselevelValue,
CaseFirst = CaseFirstValue,
CaseLevel = CaseLevelValue,
Country = CountryValue,
Decomposition = DecompositionValue,
Hiraganaquaternarymode = HiraganaquaternarymodeValue,
HiraganaQuaternaryMode = HiraganaQuaternaryModeValue,
Language = LanguageValue,
Numeric = NumericValue,
Rules = RulesValue,
Strength = StrengthValue,
Variabletop = VariabletopValue,
VariableTop = VariableTopValue,
Variant = VariantValue,
Version = VersionValue
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public sealed partial class MultiTermVectorsOperation
/// <para>The ID of the document.</para>
/// </summary>
[JsonInclude, JsonPropertyName("_id")]
public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; }
public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; }

/// <summary>
/// <para>The index of the document.</para>
Expand Down Expand Up @@ -123,7 +123,7 @@ public MultiTermVectorsOperationDescriptor() : base()
private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; }
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor> FilterDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; }
private bool? OffsetsValue { get; set; }
private bool? PayloadsValue { get; set; }
Expand Down Expand Up @@ -190,7 +190,7 @@ public MultiTermVectorsOperationDescriptor<TDocument> Filter(Action<Elastic.Clie
/// <summary>
/// <para>The ID of the document.</para>
/// </summary>
public MultiTermVectorsOperationDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.Serverless.Id id)
public MultiTermVectorsOperationDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.Serverless.Id? id)
{
IdValue = id;
return Self;
Expand Down Expand Up @@ -305,8 +305,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FilterValue, options);
}

writer.WritePropertyName("_id");
JsonSerializer.Serialize(writer, IdValue, options);
if (IdValue is not null)
{
writer.WritePropertyName("_id");
JsonSerializer.Serialize(writer, IdValue, options);
}

if (IndexValue is not null)
{
writer.WritePropertyName("_index");
Expand Down Expand Up @@ -373,7 +377,7 @@ public MultiTermVectorsOperationDescriptor() : base()
private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; }
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor> FilterDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; }
private bool? OffsetsValue { get; set; }
private bool? PayloadsValue { get; set; }
Expand Down Expand Up @@ -440,7 +444,7 @@ public MultiTermVectorsOperationDescriptor Filter(Action<Elastic.Clients.Elastic
/// <summary>
/// <para>The ID of the document.</para>
/// </summary>
public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id)
public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id)
{
IdValue = id;
return Self;
Expand Down Expand Up @@ -555,8 +559,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FilterValue, options);
}

writer.WritePropertyName("_id");
JsonSerializer.Serialize(writer, IdValue, options);
if (IdValue is not null)
{
writer.WritePropertyName("_id");
JsonSerializer.Serialize(writer, IdValue, options);
}

if (IndexValue is not null)
{
writer.WritePropertyName("_index");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public sealed partial class Hit<TDocument>
[JsonInclude, JsonPropertyName("highlight")]
public IReadOnlyDictionary<string, IReadOnlyCollection<string>>? Highlight { get; init; }
[JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
public string? Id { get; init; }
[JsonInclude, JsonPropertyName("_ignored")]
public IReadOnlyCollection<string>? Ignored { get; init; }
[JsonInclude, JsonPropertyName("ignored_field_values")]
Expand Down
Loading

0 comments on commit 655cb11

Please sign in to comment.