-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathBulkRequest.g.cs
337 lines (286 loc) · 15.7 KB
/
BulkRequest.g.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------
#nullable restore
using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Requests;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using Elastic.Transport;
using Elastic.Transport.Extensions;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Serverless;
public sealed partial class BulkRequestParameters : RequestParameters
{
/// <summary>
/// <para>
/// If <c>true</c>, the response will include the ingest pipelines that were executed for each index or create.
/// </para>
/// </summary>
public bool? ListExecutedPipelines { get => Q<bool?>("list_executed_pipelines"); set => Q("list_executed_pipelines", value); }
/// <summary>
/// <para>
/// ID of the pipeline to use to preprocess incoming documents.
/// If the index has a default ingest pipeline specified, then setting the value to <c>_none</c> disables the default ingest pipeline for this request.
/// If a final pipeline is configured it will always run, regardless of the value of this parameter.
/// </para>
/// </summary>
public string? Pipeline { get => Q<string?>("pipeline"); set => Q("pipeline", value); }
/// <summary>
/// <para>
/// If <c>true</c>, Elasticsearch refreshes the affected shards to make this operation visible to search, if <c>wait_for</c> then wait for a refresh to make this operation visible to search, if <c>false</c> do nothing with refreshes.
/// Valid values: <c>true</c>, <c>false</c>, <c>wait_for</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q<Elastic.Clients.Elasticsearch.Serverless.Refresh?>("refresh"); set => Q("refresh", value); }
/// <summary>
/// <para>
/// If <c>true</c>, the request’s actions must target an index alias.
/// </para>
/// </summary>
public bool? RequireAlias { get => Q<bool?>("require_alias"); set => Q("require_alias", value); }
/// <summary>
/// <para>
/// If <c>true</c>, the request's actions must target a data stream (existing or to-be-created).
/// </para>
/// </summary>
public bool? RequireDataStream { get => Q<bool?>("require_data_stream"); set => Q("require_data_stream", value); }
/// <summary>
/// <para>
/// Custom value used to route operations to a specific shard.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Serverless.Routing?>("routing"); set => Q("routing", value); }
/// <summary>
/// <para>
/// <c>true</c> or <c>false</c> to return the <c>_source</c> field or not, or a list of fields to return.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q<Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam?>("_source"); set => Q("_source", value); }
/// <summary>
/// <para>
/// A comma-separated list of source fields to exclude from the response.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q<Elastic.Clients.Elasticsearch.Serverless.Fields?>("_source_excludes"); set => Q("_source_excludes", value); }
/// <summary>
/// <para>
/// A comma-separated list of source fields to include in the response.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q<Elastic.Clients.Elasticsearch.Serverless.Fields?>("_source_includes"); set => Q("_source_includes", value); }
/// <summary>
/// <para>
/// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("timeout"); set => Q("timeout", value); }
/// <summary>
/// <para>
/// The number of shard copies that must be active before proceeding with the operation.
/// Set to all or any positive integer up to the total number of shards in the index (<c>number_of_replicas+1</c>).
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q<Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards?>("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
}
/// <summary>
/// <para>
/// Bulk index or delete documents.
/// Performs multiple indexing or delete operations in a single API call.
/// This reduces overhead and can greatly increase indexing speed.
/// </para>
/// </summary>
public sealed partial class BulkRequest : PlainRequest<BulkRequestParameters>
{
public BulkRequest()
{
}
public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index))
{
}
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
internal override bool SupportsBody => true;
internal override string OperationName => "bulk";
/// <summary>
/// <para>
/// If <c>true</c>, the response will include the ingest pipelines that were executed for each index or create.
/// </para>
/// </summary>
[JsonIgnore]
public bool? ListExecutedPipelines { get => Q<bool?>("list_executed_pipelines"); set => Q("list_executed_pipelines", value); }
/// <summary>
/// <para>
/// ID of the pipeline to use to preprocess incoming documents.
/// If the index has a default ingest pipeline specified, then setting the value to <c>_none</c> disables the default ingest pipeline for this request.
/// If a final pipeline is configured it will always run, regardless of the value of this parameter.
/// </para>
/// </summary>
[JsonIgnore]
public string? Pipeline { get => Q<string?>("pipeline"); set => Q("pipeline", value); }
/// <summary>
/// <para>
/// If <c>true</c>, Elasticsearch refreshes the affected shards to make this operation visible to search, if <c>wait_for</c> then wait for a refresh to make this operation visible to search, if <c>false</c> do nothing with refreshes.
/// Valid values: <c>true</c>, <c>false</c>, <c>wait_for</c>.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q<Elastic.Clients.Elasticsearch.Serverless.Refresh?>("refresh"); set => Q("refresh", value); }
/// <summary>
/// <para>
/// If <c>true</c>, the request’s actions must target an index alias.
/// </para>
/// </summary>
[JsonIgnore]
public bool? RequireAlias { get => Q<bool?>("require_alias"); set => Q("require_alias", value); }
/// <summary>
/// <para>
/// If <c>true</c>, the request's actions must target a data stream (existing or to-be-created).
/// </para>
/// </summary>
[JsonIgnore]
public bool? RequireDataStream { get => Q<bool?>("require_data_stream"); set => Q("require_data_stream", value); }
/// <summary>
/// <para>
/// Custom value used to route operations to a specific shard.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Serverless.Routing?>("routing"); set => Q("routing", value); }
/// <summary>
/// <para>
/// <c>true</c> or <c>false</c> to return the <c>_source</c> field or not, or a list of fields to return.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q<Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam?>("_source"); set => Q("_source", value); }
/// <summary>
/// <para>
/// A comma-separated list of source fields to exclude from the response.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q<Elastic.Clients.Elasticsearch.Serverless.Fields?>("_source_excludes"); set => Q("_source_excludes", value); }
/// <summary>
/// <para>
/// A comma-separated list of source fields to include in the response.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q<Elastic.Clients.Elasticsearch.Serverless.Fields?>("_source_includes"); set => Q("_source_includes", value); }
/// <summary>
/// <para>
/// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("timeout"); set => Q("timeout", value); }
/// <summary>
/// <para>
/// The number of shard copies that must be active before proceeding with the operation.
/// Set to all or any positive integer up to the total number of shards in the index (<c>number_of_replicas+1</c>).
/// </para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q<Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards?>("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
}
/// <summary>
/// <para>
/// Bulk index or delete documents.
/// Performs multiple indexing or delete operations in a single API call.
/// This reduces overhead and can greatly increase indexing speed.
/// </para>
/// </summary>
public sealed partial class BulkRequestDescriptor<TDocument> : RequestDescriptor<BulkRequestDescriptor<TDocument>, BulkRequestParameters>
{
internal BulkRequestDescriptor(Action<BulkRequestDescriptor<TDocument>> configure) => configure.Invoke(this);
public BulkRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index))
{
}
public BulkRequestDescriptor() : this(typeof(TDocument))
{
}
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
internal override bool SupportsBody => true;
internal override string OperationName => "bulk";
public BulkRequestDescriptor<TDocument> ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines);
public BulkRequestDescriptor<TDocument> Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor<TDocument> Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor<TDocument> RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor<TDocument> RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream);
public BulkRequestDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public BulkRequestDescriptor<TDocument> Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor<TDocument> SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public BulkRequestDescriptor<TDocument> SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor<TDocument> Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public BulkRequestDescriptor<TDocument> WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
public BulkRequestDescriptor<TDocument> Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index)
{
RouteValues.Optional("index", index);
return Self;
}
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
writer.WriteEndObject();
}
}
/// <summary>
/// <para>
/// Bulk index or delete documents.
/// Performs multiple indexing or delete operations in a single API call.
/// This reduces overhead and can greatly increase indexing speed.
/// </para>
/// </summary>
public sealed partial class BulkRequestDescriptor : RequestDescriptor<BulkRequestDescriptor, BulkRequestParameters>
{
internal BulkRequestDescriptor(Action<BulkRequestDescriptor> configure) => configure.Invoke(this);
public BulkRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index))
{
}
public BulkRequestDescriptor()
{
}
internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk;
protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
internal override bool SupportsBody => true;
internal override string OperationName => "bulk";
public BulkRequestDescriptor ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines);
public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream);
public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
public BulkRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index)
{
RouteValues.Optional("index", index);
return Self;
}
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
writer.WriteEndObject();
}
}