forked from opensearch-project/opensearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDescriptors.Indices.cs
More file actions
1406 lines (1299 loc) · 90.5 KB
/
Descriptors.Indices.cs
File metadata and controls
1406 lines (1299 loc) · 90.5 KB
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
/*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//
// This file is automatically generated
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// *NIX : ./build.sh codegen
// Windows : build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using OpenSearch.Net;
using OpenSearch.Net.Utf8Json;
using OpenSearch.Net.Specification.IndicesApi;
// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client
{
///<summary>Descriptor for AddBlock <para></para></summary>
public partial class AddIndexBlockDescriptor : RequestDescriptorBase<AddIndexBlockDescriptor, AddIndexBlockRequestParameters, IAddIndexBlockRequest>, IAddIndexBlockRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAddBlock;
///<summary>/{index}/_block/{block}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "block">this parameter is required</param>
public AddIndexBlockDescriptor(Indices index, IndexBlock block): base(r => r.Required("index", index).Required("block", block))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected AddIndexBlockDescriptor(): base()
{
}
// values part of the url path
Indices IAddIndexBlockRequest.Index => Self.RouteValues.Get<Indices>("index");
IndexBlock IAddIndexBlockRequest.Block => Self.RouteValues.Get<IndexBlock>("block");
///<summary>A comma separated list of indices to add a block to</summary>
public AddIndexBlockDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public AddIndexBlockDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public AddIndexBlockDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public AddIndexBlockDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public AddIndexBlockDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public AddIndexBlockDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public AddIndexBlockDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public AddIndexBlockDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public AddIndexBlockDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///<summary>Descriptor for Analyze <para></para></summary>
public partial class AnalyzeDescriptor : RequestDescriptorBase<AnalyzeDescriptor, AnalyzeRequestParameters, IAnalyzeRequest>, IAnalyzeRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAnalyze;
///<summary>/_analyze</summary>
public AnalyzeDescriptor(): base()
{
}
///<summary>/{index}/_analyze</summary>
///<param name = "index">Optional, accepts null</param>
public AnalyzeDescriptor(IndexName index): base(r => r.Optional("index", index))
{
}
// values part of the url path
IndexName IAnalyzeRequest.Index => Self.RouteValues.Get<IndexName>("index");
///<summary>The name of the index to scope the operation</summary>
public AnalyzeDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public AnalyzeDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v));
// Request parameters
}
///<summary>Descriptor for ClearCache <para></para></summary>
public partial class ClearCacheDescriptor : RequestDescriptorBase<ClearCacheDescriptor, ClearCacheRequestParameters, IClearCacheRequest>, IClearCacheRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClearCache;
///<summary>/_cache/clear</summary>
public ClearCacheDescriptor(): base()
{
}
///<summary>/{index}/_cache/clear</summary>
///<param name = "index">Optional, accepts null</param>
public ClearCacheDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IClearCacheRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index name to limit the operation</summary>
public ClearCacheDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public ClearCacheDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public ClearCacheDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public ClearCacheDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ClearCacheDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Clear field data</summary>
public ClearCacheDescriptor Fielddata(bool? fielddata = true) => Qs("fielddata", fielddata);
///<summary>A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)</summary>
public ClearCacheDescriptor Fields(Fields fields) => Qs("fields", fields);
///<summary>A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)</summary>
public ClearCacheDescriptor Fields<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("fields", fields?.Select(e => (Field)e));
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public ClearCacheDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Clear query caches</summary>
public ClearCacheDescriptor Query(bool? query = true) => Qs("query", query);
///<summary>Clear request cache</summary>
public ClearCacheDescriptor Request(bool? request = true) => Qs("request", request);
}
///<summary>Descriptor for Clone <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/</para></summary>
public partial class CloneIndexDescriptor : RequestDescriptorBase<CloneIndexDescriptor, CloneIndexRequestParameters, ICloneIndexRequest>, ICloneIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClone;
///<summary>/{index}/_clone/{target}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "target">this parameter is required</param>
public CloneIndexDescriptor(IndexName index, IndexName target): base(r => r.Required("index", index).Required("target", target))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected CloneIndexDescriptor(): base()
{
}
// values part of the url path
IndexName ICloneIndexRequest.Index => Self.RouteValues.Get<IndexName>("index");
IndexName ICloneIndexRequest.Target => Self.RouteValues.Get<IndexName>("target");
///<summary>The name of the source index to clone</summary>
public CloneIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public CloneIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public CloneIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public CloneIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public CloneIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Set the number of active shards to wait for on the cloned index before the operation returns.</summary>
public CloneIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for Close <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/</para></summary>
public partial class CloseIndexDescriptor : RequestDescriptorBase<CloseIndexDescriptor, CloseIndexRequestParameters, ICloseIndexRequest>, ICloseIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClose;
///<summary>/{index}/_close</summary>
///<param name = "index">this parameter is required</param>
public CloseIndexDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected CloseIndexDescriptor(): base()
{
}
// values part of the url path
Indices ICloseIndexRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma separated list of indices to close</summary>
public CloseIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public CloseIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public CloseIndexDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public CloseIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public CloseIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public CloseIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public CloseIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public CloseIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public CloseIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Sets the number of active shards to wait for before the operation returns.</summary>
public CloseIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for Create <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/</para></summary>
public partial class CreateIndexDescriptor : RequestDescriptorBase<CreateIndexDescriptor, CreateIndexRequestParameters, ICreateIndexRequest>, ICreateIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesCreate;
///<summary>/{index}</summary>
///<param name = "index">this parameter is required</param>
public CreateIndexDescriptor(IndexName index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected CreateIndexDescriptor(): base()
{
}
// values part of the url path
IndexName ICreateIndexRequest.Index => Self.RouteValues.Get<IndexName>("index");
///<summary>The name of the index</summary>
public CreateIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public CreateIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Whether a type should be expected in the body of the mappings.</summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public CreateIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public CreateIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public CreateIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public CreateIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Set the number of active shards to wait for before the operation returns.</summary>
public CreateIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for Delete <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/</para></summary>
public partial class DeleteIndexDescriptor : RequestDescriptorBase<DeleteIndexDescriptor, DeleteIndexRequestParameters, IDeleteIndexRequest>, IDeleteIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDelete;
///<summary>/{index}</summary>
///<param name = "index">this parameter is required</param>
public DeleteIndexDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteIndexDescriptor(): base()
{
}
// values part of the url path
Indices IDeleteIndexRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices</summary>
public DeleteIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public DeleteIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public DeleteIndexDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Ignore if a wildcard expression resolves to no concrete indices (default: false)</summary>
public DeleteIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether wildcard expressions should get expanded to open or closed indices (default: open)</summary>
public DeleteIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Ignore unavailable indexes (default: false)</summary>
public DeleteIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public DeleteIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public DeleteIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public DeleteIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///<summary>Descriptor for DeleteAlias <para>https://opensearch.org/docs/latest/opensearch/rest-api/alias/</para></summary>
public partial class DeleteAliasDescriptor : RequestDescriptorBase<DeleteAliasDescriptor, DeleteAliasRequestParameters, IDeleteAliasRequest>, IDeleteAliasRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteAlias;
///<summary>/{index}/_alias/{name}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "name">this parameter is required</param>
public DeleteAliasDescriptor(Indices index, Names name): base(r => r.Required("index", index).Required("name", name))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteAliasDescriptor(): base()
{
}
// values part of the url path
Indices IDeleteAliasRequest.Index => Self.RouteValues.Get<Indices>("index");
Names IDeleteAliasRequest.Name => Self.RouteValues.Get<Names>("name");
///<summary>A comma-separated list of index names (supports wildcards); use `_all` for all indices</summary>
public DeleteAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public DeleteAliasDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public DeleteAliasDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public DeleteAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public DeleteAliasDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit timestamp for the document</summary>
public DeleteAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///<summary>Descriptor for DeleteTemplate <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public partial class DeleteIndexTemplateDescriptor : RequestDescriptorBase<DeleteIndexTemplateDescriptor, DeleteIndexTemplateRequestParameters, IDeleteIndexTemplateRequest>, IDeleteIndexTemplateRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteTemplate;
///<summary>/_template/{name}</summary>
///<param name = "name">this parameter is required</param>
public DeleteIndexTemplateDescriptor(Name name): base(r => r.Required("name", name))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteIndexTemplateDescriptor(): base()
{
}
// values part of the url path
Name IDeleteIndexTemplateRequest.Name => Self.RouteValues.Get<Name>("name");
// Request parameters
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public DeleteIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public DeleteIndexTemplateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public DeleteIndexTemplateDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///<summary>Descriptor for Exists <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/</para></summary>
public partial class IndexExistsDescriptor : RequestDescriptorBase<IndexExistsDescriptor, IndexExistsRequestParameters, IIndexExistsRequest>, IIndexExistsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesExists;
///<summary>/{index}</summary>
///<param name = "index">this parameter is required</param>
public IndexExistsDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected IndexExistsDescriptor(): base()
{
}
// values part of the url path
Indices IIndexExistsRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names</summary>
public IndexExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public IndexExistsDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public IndexExistsDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Ignore if a wildcard expression resolves to no concrete indices (default: false)</summary>
public IndexExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether wildcard expressions should get expanded to open or closed indices (default: open)</summary>
public IndexExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Return settings in flat format (default: false)</summary>
public IndexExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Ignore unavailable indexes (default: false)</summary>
public IndexExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether to return all default setting for each of the indices.</summary>
public IndexExistsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public IndexExistsDescriptor Local(bool? local = true) => Qs("local", local);
}
///<summary>Descriptor for AliasExists <para>https://opensearch.org/docs/latest/opensearch/rest-api/alias/</para></summary>
public partial class AliasExistsDescriptor : RequestDescriptorBase<AliasExistsDescriptor, AliasExistsRequestParameters, IAliasExistsRequest>, IAliasExistsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAliasExists;
///<summary>/_alias/{name}</summary>
///<param name = "name">this parameter is required</param>
public AliasExistsDescriptor(Names name): base(r => r.Required("name", name))
{
}
///<summary>/{index}/_alias/{name}</summary>
///<param name = "index">Optional, accepts null</param>
///<param name = "name">this parameter is required</param>
public AliasExistsDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Required("name", name))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected AliasExistsDescriptor(): base()
{
}
// values part of the url path
Names IAliasExistsRequest.Name => Self.RouteValues.Get<Names>("name");
Indices IAliasExistsRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names to filter aliases</summary>
public AliasExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public AliasExistsDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public AliasExistsDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public AliasExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public AliasExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public AliasExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public AliasExistsDescriptor Local(bool? local = true) => Qs("local", local);
}
///<summary>Descriptor for TemplateExists <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public partial class IndexTemplateExistsDescriptor : RequestDescriptorBase<IndexTemplateExistsDescriptor, IndexTemplateExistsRequestParameters, IIndexTemplateExistsRequest>, IIndexTemplateExistsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTemplateExists;
///<summary>/_template/{name}</summary>
///<param name = "name">this parameter is required</param>
public IndexTemplateExistsDescriptor(Names name): base(r => r.Required("name", name))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected IndexTemplateExistsDescriptor(): base()
{
}
// values part of the url path
Names IIndexTemplateExistsRequest.Name => Self.RouteValues.Get<Names>("name");
// Request parameters
///<summary>Return settings in flat format (default: false)</summary>
public IndexTemplateExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public IndexTemplateExistsDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Specify timeout for connection to master node</summary>
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public IndexTemplateExistsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public IndexTemplateExistsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///<summary>Descriptor for TypeExists <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/</para></summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public partial class TypeExistsDescriptor : RequestDescriptorBase<TypeExistsDescriptor, TypeExistsRequestParameters, ITypeExistsRequest>, ITypeExistsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTypeExists;
///<summary>/{index}/_mapping/{type}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "type">this parameter is required</param>
public TypeExistsDescriptor(Indices index, Names type): base(r => r.Required("index", index).Required("type", type))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected TypeExistsDescriptor(): base()
{
}
// values part of the url path
Indices ITypeExistsRequest.Index => Self.RouteValues.Get<Indices>("index");
Names ITypeExistsRequest.Type => Self.RouteValues.Get<Names>("type");
///<summary>A comma-separated list of index names; use `_all` to check the types across all indices</summary>
public TypeExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public TypeExistsDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public TypeExistsDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public TypeExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public TypeExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public TypeExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public TypeExistsDescriptor Local(bool? local = true) => Qs("local", local);
}
///<summary>Descriptor for Flush <para></para></summary>
public partial class FlushDescriptor : RequestDescriptorBase<FlushDescriptor, FlushRequestParameters, IFlushRequest>, IFlushRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesFlush;
///<summary>/_flush</summary>
public FlushDescriptor(): base()
{
}
///<summary>/{index}/_flush</summary>
///<param name = "index">Optional, accepts null</param>
public FlushDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IFlushRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names; use the special string `_all` or Indices.All for all indices</summary>
public FlushDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public FlushDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public FlushDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public FlushDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public FlushDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)</summary>
public FlushDescriptor Force(bool? force = true) => Qs("force", force);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public FlushDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.</summary>
public FlushDescriptor WaitIfOngoing(bool? waitifongoing = true) => Qs("wait_if_ongoing", waitifongoing);
}
///<summary>Descriptor for ForceMerge <para></para></summary>
public partial class ForceMergeDescriptor : RequestDescriptorBase<ForceMergeDescriptor, ForceMergeRequestParameters, IForceMergeRequest>, IForceMergeRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesForceMerge;
///<summary>/_forcemerge</summary>
public ForceMergeDescriptor(): base()
{
}
///<summary>/{index}/_forcemerge</summary>
///<param name = "index">Optional, accepts null</param>
public ForceMergeDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IForceMergeRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices</summary>
public ForceMergeDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public ForceMergeDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public ForceMergeDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public ForceMergeDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ForceMergeDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Specify whether the index should be flushed after performing the operation (default: true)</summary>
public ForceMergeDescriptor Flush(bool? flush = true) => Qs("flush", flush);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public ForceMergeDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>The number of segments the index should be merged into (default: dynamic)</summary>
public ForceMergeDescriptor MaxNumSegments(long? maxnumsegments) => Qs("max_num_segments", maxnumsegments);
///<summary>Specify whether the operation should only expunge deleted documents</summary>
public ForceMergeDescriptor OnlyExpungeDeletes(bool? onlyexpungedeletes = true) => Qs("only_expunge_deletes", onlyexpungedeletes);
}
///<summary>Descriptor for Get <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/</para></summary>
public partial class GetIndexDescriptor : RequestDescriptorBase<GetIndexDescriptor, GetIndexRequestParameters, IGetIndexRequest>, IGetIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGet;
///<summary>/{index}</summary>
///<param name = "index">this parameter is required</param>
public GetIndexDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected GetIndexDescriptor(): base()
{
}
// values part of the url path
Indices IGetIndexRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names</summary>
public GetIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public GetIndexDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Ignore if a wildcard expression resolves to no concrete indices (default: false)</summary>
public GetIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether wildcard expressions should get expanded to open or closed indices (default: open)</summary>
public GetIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Return settings in flat format (default: false)</summary>
public GetIndexDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Ignore unavailable indexes (default: false)</summary>
public GetIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether to return all default setting for each of the indices.</summary>
public GetIndexDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
///<summary>Whether to add the type name to the response (default: false)</summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public GetIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public GetIndexDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public GetIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public GetIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///<summary>Descriptor for GetAlias <para>https://opensearch.org/docs/latest/opensearch/rest-api/alias/</para></summary>
public partial class GetAliasDescriptor : RequestDescriptorBase<GetAliasDescriptor, GetAliasRequestParameters, IGetAliasRequest>, IGetAliasRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetAlias;
///<summary>/_alias</summary>
public GetAliasDescriptor(): base()
{
}
///<summary>/_alias/{name}</summary>
///<param name = "name">Optional, accepts null</param>
public GetAliasDescriptor(Names name): base(r => r.Optional("name", name))
{
}
///<summary>/{index}/_alias/{name}</summary>
///<param name = "index">Optional, accepts null</param>
///<param name = "name">Optional, accepts null</param>
public GetAliasDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Optional("name", name))
{
}
///<summary>/{index}/_alias</summary>
///<param name = "index">Optional, accepts null</param>
public GetAliasDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Names IGetAliasRequest.Name => Self.RouteValues.Get<Names>("name");
Indices IGetAliasRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of alias names to return</summary>
public GetAliasDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v));
///<summary>A comma-separated list of index names to filter aliases</summary>
public GetAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetAliasDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public GetAliasDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public GetAliasDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public GetAliasDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public GetAliasDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public GetAliasDescriptor Local(bool? local = true) => Qs("local", local);
}
///<summary>Descriptor for GetFieldMapping <para>https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/</para></summary>
public partial class GetFieldMappingDescriptor<TDocument> : RequestDescriptorBase<GetFieldMappingDescriptor<TDocument>, GetFieldMappingRequestParameters, IGetFieldMappingRequest>, IGetFieldMappingRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetFieldMapping;
///<summary>/{index}/_mapping/field/{fields}</summary>
///<param name = "fields">this parameter is required</param>
public GetFieldMappingDescriptor(Fields fields): this(typeof(TDocument), fields)
{
}
///<summary>/{index}/_mapping/field/{fields}</summary>
///<param name = "index">Optional, accepts null</param>
///<param name = "fields">this parameter is required</param>
public GetFieldMappingDescriptor(Indices index, Fields fields): base(r => r.Optional("index", index).Required("fields", fields))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected GetFieldMappingDescriptor(): base()
{
}
// values part of the url path
Fields IGetFieldMappingRequest.Fields => Self.RouteValues.Get<Fields>("fields");
Indices IGetFieldMappingRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names</summary>
public GetFieldMappingDescriptor<TDocument> Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetFieldMappingDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public GetFieldMappingDescriptor<TDocument> AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public GetFieldMappingDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public GetFieldMappingDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public GetFieldMappingDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether the default mapping values should be returned as well</summary>
public GetFieldMappingDescriptor<TDocument> IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
///<summary>Whether a type should be returned in the body of the mappings.</summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public GetFieldMappingDescriptor<TDocument> IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public GetFieldMappingDescriptor<TDocument> Local(bool? local = true) => Qs("local", local);
}
///<summary>Descriptor for GetMapping <para>https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/</para></summary>
public partial class GetMappingDescriptor<TDocument> : RequestDescriptorBase<GetMappingDescriptor<TDocument>, GetMappingRequestParameters, IGetMappingRequest>, IGetMappingRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetMapping;
///<summary>/{index}/_mapping</summary>
public GetMappingDescriptor(): this(typeof(TDocument))
{
}
///<summary>/{index}/_mapping</summary>
///<param name = "index">Optional, accepts null</param>
public GetMappingDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IGetMappingRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names</summary>
public GetMappingDescriptor<TDocument> Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetMappingDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public GetMappingDescriptor<TDocument> AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public GetMappingDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public GetMappingDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public GetMappingDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether to add the type name to the response (default: false)</summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public GetMappingDescriptor<TDocument> IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public GetMappingDescriptor<TDocument> MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public GetMappingDescriptor<TDocument> ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///<summary>Descriptor for GetSettings <para></para></summary>
public partial class GetIndexSettingsDescriptor : RequestDescriptorBase<GetIndexSettingsDescriptor, GetIndexSettingsRequestParameters, IGetIndexSettingsRequest>, IGetIndexSettingsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetSettings;
///<summary>/_settings</summary>
public GetIndexSettingsDescriptor(): base()
{
}
///<summary>/{index}/_settings</summary>
///<param name = "index">Optional, accepts null</param>
public GetIndexSettingsDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
///<summary>/{index}/_settings/{name}</summary>
///<param name = "index">Optional, accepts null</param>
///<param name = "name">Optional, accepts null</param>
public GetIndexSettingsDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Optional("name", name))
{
}
///<summary>/_settings/{name}</summary>
///<param name = "name">Optional, accepts null</param>
public GetIndexSettingsDescriptor(Names name): base(r => r.Optional("name", name))
{
}
// values part of the url path
Indices IGetIndexSettingsRequest.Index => Self.RouteValues.Get<Indices>("index");
Names IGetIndexSettingsRequest.Name => Self.RouteValues.Get<Names>("name");
///<summary>A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices</summary>
public GetIndexSettingsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetIndexSettingsDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public GetIndexSettingsDescriptor AllIndices() => Index(Indices.All);
///<summary>The name of the settings that should be included</summary>
public GetIndexSettingsDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v));
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public GetIndexSettingsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public GetIndexSettingsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Return settings in flat format (default: false)</summary>
public GetIndexSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public GetIndexSettingsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether to return all default setting for each of the indices.</summary>
public GetIndexSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public GetIndexSettingsDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public GetIndexSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public GetIndexSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///<summary>Descriptor for GetTemplate <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public partial class GetIndexTemplateDescriptor : RequestDescriptorBase<GetIndexTemplateDescriptor, GetIndexTemplateRequestParameters, IGetIndexTemplateRequest>, IGetIndexTemplateRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetTemplate;
///<summary>/_template</summary>
public GetIndexTemplateDescriptor(): base()
{
}
///<summary>/_template/{name}</summary>
///<param name = "name">Optional, accepts null</param>
public GetIndexTemplateDescriptor(Names name): base(r => r.Optional("name", name))
{
}
// values part of the url path
Names IGetIndexTemplateRequest.Name => Self.RouteValues.Get<Names>("name");
///<summary>The comma separated names of the index templates</summary>
public GetIndexTemplateDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v));
// Request parameters
///<summary>Return settings in flat format (default: false)</summary>
public GetIndexTemplateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Whether a type should be returned in the body of the mappings.</summary>
///<remarks>Deprecated as of OpenSearch 2.0</remarks>
public GetIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public GetIndexTemplateDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Specify timeout for connection to master node</summary>
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public GetIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public GetIndexTemplateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///<summary>Descriptor for Open <para>https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/</para></summary>
public partial class OpenIndexDescriptor : RequestDescriptorBase<OpenIndexDescriptor, OpenIndexRequestParameters, IOpenIndexRequest>, IOpenIndexRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesOpen;
///<summary>/{index}/_open</summary>
///<param name = "index">this parameter is required</param>
public OpenIndexDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected OpenIndexDescriptor(): base()
{
}
// values part of the url path
Indices IOpenIndexRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma separated list of indices to open</summary>
public OpenIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public OpenIndexDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public OpenIndexDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public OpenIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public OpenIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public OpenIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public OpenIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public OpenIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit operation timeout</summary>
public OpenIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Sets the number of active shards to wait for before the operation returns.</summary>
public OpenIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for PutAlias <para>https://opensearch.org/docs/latest/opensearch/rest-api/alias/</para></summary>
public partial class PutAliasDescriptor : RequestDescriptorBase<PutAliasDescriptor, PutAliasRequestParameters, IPutAliasRequest>, IPutAliasRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutAlias;
///<summary>/{index}/_alias/{name}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "name">this parameter is required</param>
public PutAliasDescriptor(Indices index, Name name): base(r => r.Required("index", index).Required("name", name))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected PutAliasDescriptor(): base()
{
}
// values part of the url path
Indices IPutAliasRequest.Index => Self.RouteValues.Get<Indices>("index");
Name IPutAliasRequest.Name => Self.RouteValues.Get<Name>("name");
///<summary>A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.</summary>
public PutAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public PutAliasDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public PutAliasDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public PutAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Specify timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public PutAliasDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Explicit timestamp for the document</summary>