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
+ }
0 commit comments