Skip to content

Commit cb4ebb8

Browse files
authored
[8.19] Regenerate client (#8710)
1 parent 15769f2 commit cb4ebb8

6 files changed

+250
-182
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
#nullable restore
19+
20+
using System;
21+
using System.Linq;
22+
using Elastic.Clients.Elasticsearch.Serialization;
23+
24+
namespace Elastic.Clients.Elasticsearch.Fluent;
25+
26+
public readonly partial struct FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument>
27+
{
28+
private readonly System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> _items = new();
29+
30+
private System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> Value => _items;
31+
32+
public FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource()
33+
{
34+
}
35+
36+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument> Add(System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> value)
37+
{
38+
_items.Add(value);
39+
return this;
40+
}
41+
42+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument> Add(params System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>[] values)
43+
{
44+
_items.AddRange(values);
45+
return this;
46+
}
47+
48+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument> Add(string key, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource value)
49+
{
50+
_items.Add(new System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(key, value));
51+
return this;
52+
}
53+
54+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument> Add(string key, System.Action<Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor<TDocument>> action)
55+
{
56+
_items.Add(new System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(key, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor<TDocument>.Build(action)));
57+
return this;
58+
}
59+
60+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
61+
internal static System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> Build(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument>>? action)
62+
{
63+
if (action is null)
64+
{
65+
return [];
66+
}
67+
68+
var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource<TDocument>();
69+
action.Invoke(builder);
70+
return builder.Value;
71+
}
72+
}
73+
74+
public readonly partial struct FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource
75+
{
76+
private readonly System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> _items = new();
77+
78+
private System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> Value => _items;
79+
80+
public FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource()
81+
{
82+
}
83+
84+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource Add(System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> value)
85+
{
86+
_items.Add(value);
87+
return this;
88+
}
89+
90+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource Add(params System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>[] values)
91+
{
92+
_items.AddRange(values);
93+
return this;
94+
}
95+
96+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource Add(string key, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource value)
97+
{
98+
_items.Add(new System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(key, value));
99+
return this;
100+
}
101+
102+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource Add(string key, System.Action<Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor> action)
103+
{
104+
_items.Add(new System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(key, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor.Build(action)));
105+
return this;
106+
}
107+
108+
public Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource Add<T>(string key, System.Action<Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor<T>> action)
109+
{
110+
_items.Add(new System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(key, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSourceDescriptor<T>.Build(action)));
111+
return this;
112+
}
113+
114+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
115+
internal static System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>> Build(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource>? action)
116+
{
117+
if (action is null)
118+
{
119+
return [];
120+
}
121+
122+
var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentCollectionOfKeyValuePairOfStringCompositeAggregationSource();
123+
action.Invoke(builder);
124+
return builder.Value;
125+
}
126+
}

src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentDictionaryOfStringCompositeAggregationSource.g.cs

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.Converters.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregation
3434
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
3535
LocalJsonValue<System.Collections.Generic.IDictionary<Elastic.Clients.Elasticsearch.Field, Elastic.Clients.Elasticsearch.FieldValue>?> propAfter = default;
3636
LocalJsonValue<int?> propSize = default;
37-
LocalJsonValue<System.Collections.Generic.ICollection<System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>?> propSources = default;
37+
LocalJsonValue<System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>?> propSources = default;
3838
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
3939
{
4040
if (propAfter.TryReadProperty(ref reader, options, PropAfter, static System.Collections.Generic.IDictionary<Elastic.Clients.Elasticsearch.Field, Elastic.Clients.Elasticsearch.FieldValue>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue<Elastic.Clients.Elasticsearch.Field, Elastic.Clients.Elasticsearch.FieldValue>(o, null, null)))
@@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregation
4747
continue;
4848
}
4949

50-
if (propSources.TryReadProperty(ref reader, options, PropSources, static System.Collections.Generic.ICollection<System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue<System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>(o, static System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(o, null, null)!)))
50+
if (propSources.TryReadProperty(ref reader, options, PropSources, static System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>(o, static System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadKeyValuePairValue<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(o, null, null))))
5151
{
5252
continue;
5353
}
@@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
7575
writer.WriteStartObject();
7676
writer.WriteProperty(options, PropAfter, value.After, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary<Elastic.Clients.Elasticsearch.Field, Elastic.Clients.Elasticsearch.FieldValue>? v) => w.WriteDictionaryValue<Elastic.Clients.Elasticsearch.Field, Elastic.Clients.Elasticsearch.FieldValue>(o, v, null, null));
7777
writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue<int>(o, v));
78-
writer.WriteProperty(options, PropSources, value.Sources, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection<System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>? v) => w.WriteCollectionValue<System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> v) => w.WriteDictionaryValue<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(o, v, null, null)));
78+
writer.WriteProperty(options, PropSources, value.Sources, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>? v) => w.WriteCollectionValue<System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource> v) => w.WriteKeyValuePairValue<string, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregationSource>(o, v, null, null)));
7979
writer.WriteEndObject();
8080
}
8181
}

0 commit comments

Comments
 (0)