/* 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.Specification.IndicesApi { ///Descriptor for AddBlock public partial class AddIndexBlockDescriptor : RequestDescriptorBase, IAddIndexBlockRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAddBlock; ////{index}/_block/{block} ///this parameter is required ///this parameter is required public AddIndexBlockDescriptor(Indices index, IndexBlock block): base(r => r.Required("index", index).Required("block", block)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected AddIndexBlockDescriptor(): base() { } // values part of the url path Indices IAddIndexBlockRequest.Index => Self.RouteValues.Get("index"); IndexBlock IAddIndexBlockRequest.Block => Self.RouteValues.Get("block"); ///A comma separated list of indices to add a block to public AddIndexBlockDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public AddIndexBlockDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public AddIndexBlockDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public AddIndexBlockDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public AddIndexBlockDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public AddIndexBlockDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public AddIndexBlockDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public AddIndexBlockDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public AddIndexBlockDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for Analyze public partial class AnalyzeDescriptor : RequestDescriptorBase, IAnalyzeRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAnalyze; ////_analyze public AnalyzeDescriptor(): base() { } ////{index}/_analyze ///Optional, accepts null public AnalyzeDescriptor(IndexName index): base(r => r.Optional("index", index)) { } // values part of the url path IndexName IAnalyzeRequest.Index => Self.RouteValues.Get("index"); ///The name of the index to scope the operation public AnalyzeDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public AnalyzeDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters } ///Descriptor for ClearCache public partial class ClearCacheDescriptor : RequestDescriptorBase, IClearCacheRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClearCache; ////_cache/clear public ClearCacheDescriptor(): base() { } ////{index}/_cache/clear ///Optional, accepts null public ClearCacheDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IClearCacheRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index name to limit the operation public ClearCacheDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public ClearCacheDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public ClearCacheDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ClearCacheDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ClearCacheDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Clear field data public ClearCacheDescriptor Fielddata(bool? fielddata = true) => Qs("fielddata", fielddata); ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) public ClearCacheDescriptor Fields(Fields fields) => Qs("fields", fields); ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) public ClearCacheDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ClearCacheDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Clear query caches public ClearCacheDescriptor Query(bool? query = true) => Qs("query", query); ///Clear request cache public ClearCacheDescriptor Request(bool? request = true) => Qs("request", request); } ///Descriptor for Clone https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/ public partial class CloneIndexDescriptor : RequestDescriptorBase, ICloneIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClone; ////{index}/_clone/{target} ///this parameter is required ///this parameter is required public CloneIndexDescriptor(IndexName index, IndexName target): base(r => r.Required("index", index).Required("target", target)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected CloneIndexDescriptor(): base() { } // values part of the url path IndexName ICloneIndexRequest.Index => Self.RouteValues.Get("index"); IndexName ICloneIndexRequest.Target => Self.RouteValues.Get("target"); ///The name of the source index to clone public CloneIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public CloneIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public CloneIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public CloneIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public CloneIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Set the number of active shards to wait for on the cloned index before the operation returns. public CloneIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for Close https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ public partial class CloseIndexDescriptor : RequestDescriptorBase, ICloseIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClose; ////{index}/_close ///this parameter is required public CloseIndexDescriptor(Indices index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected CloseIndexDescriptor(): base() { } // values part of the url path Indices ICloseIndexRequest.Index => Self.RouteValues.Get("index"); ///A comma separated list of indices to close public CloseIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public CloseIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public CloseIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public CloseIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public CloseIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public CloseIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public CloseIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public CloseIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public CloseIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Sets the number of active shards to wait for before the operation returns. public CloseIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for Create https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/ public partial class CreateIndexDescriptor : RequestDescriptorBase, ICreateIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesCreate; ////{index} ///this parameter is required public CreateIndexDescriptor(IndexName index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected CreateIndexDescriptor(): base() { } // values part of the url path IndexName ICreateIndexRequest.Index => Self.RouteValues.Get("index"); ///The name of the index public CreateIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public CreateIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters ///Whether a type should be expected in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public CreateIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public CreateIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public CreateIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public CreateIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Set the number of active shards to wait for before the operation returns. public CreateIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for Delete https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/ public partial class DeleteIndexDescriptor : RequestDescriptorBase, IDeleteIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDelete; ////{index} ///this parameter is required public DeleteIndexDescriptor(Indices index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected DeleteIndexDescriptor(): base() { } // values part of the url path Indices IDeleteIndexRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices public DeleteIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public DeleteIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public DeleteIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public DeleteIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public DeleteIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Ignore unavailable indexes (default: false) public DeleteIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public DeleteIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public DeleteIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public DeleteIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for DeleteAlias https://opensearch.org/docs/latest/opensearch/rest-api/alias/ public partial class DeleteAliasDescriptor : RequestDescriptorBase, IDeleteAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteAlias; ////{index}/_alias/{name} ///this parameter is required ///this parameter is required public DeleteAliasDescriptor(Indices index, Names name): base(r => r.Required("index", index).Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected DeleteAliasDescriptor(): base() { } // values part of the url path Indices IDeleteAliasRequest.Index => Self.RouteValues.Get("index"); Names IDeleteAliasRequest.Name => Self.RouteValues.Get("name"); ///A comma-separated list of index names (supports wildcards); use `_all` for all indices public DeleteAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public DeleteAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public DeleteAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public DeleteAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public DeleteAliasDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit timestamp for the document public DeleteAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for DeleteTemplate https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ public partial class DeleteIndexTemplateDescriptor : RequestDescriptorBase, IDeleteIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteTemplate; ////_template/{name} ///this parameter is required public DeleteIndexTemplateDescriptor(Name name): base(r => r.Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected DeleteIndexTemplateDescriptor(): base() { } // values part of the url path Name IDeleteIndexTemplateRequest.Name => Self.RouteValues.Get("name"); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public DeleteIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public DeleteIndexTemplateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public DeleteIndexTemplateDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for Exists https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ public partial class IndexExistsDescriptor : RequestDescriptorBase, IIndexExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesExists; ////{index} ///this parameter is required public IndexExistsDescriptor(Indices index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected IndexExistsDescriptor(): base() { } // values part of the url path Indices IIndexExistsRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names public IndexExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public IndexExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public IndexExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public IndexExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public IndexExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Return settings in flat format (default: false) public IndexExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Ignore unavailable indexes (default: false) public IndexExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether to return all default setting for each of the indices. public IndexExistsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public IndexExistsDescriptor Local(bool? local = true) => Qs("local", local); } ///Descriptor for AliasExists https://opensearch.org/docs/latest/opensearch/rest-api/alias/ public partial class AliasExistsDescriptor : RequestDescriptorBase, IAliasExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAliasExists; ////_alias/{name} ///this parameter is required public AliasExistsDescriptor(Names name): base(r => r.Required("name", name)) { } ////{index}/_alias/{name} ///Optional, accepts null ///this parameter is required public AliasExistsDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected AliasExistsDescriptor(): base() { } // values part of the url path Names IAliasExistsRequest.Name => Self.RouteValues.Get("name"); Indices IAliasExistsRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names to filter aliases public AliasExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public AliasExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public AliasExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public AliasExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public AliasExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public AliasExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public AliasExistsDescriptor Local(bool? local = true) => Qs("local", local); } ///Descriptor for TemplateExists https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ public partial class IndexTemplateExistsDescriptor : RequestDescriptorBase, IIndexTemplateExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTemplateExists; ////_template/{name} ///this parameter is required public IndexTemplateExistsDescriptor(Names name): base(r => r.Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected IndexTemplateExistsDescriptor(): base() { } // values part of the url path Names IIndexTemplateExistsRequest.Name => Self.RouteValues.Get("name"); // Request parameters ///Return settings in flat format (default: false) public IndexTemplateExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public IndexTemplateExistsDescriptor Local(bool? local = true) => Qs("local", local); ///Specify timeout for connection to master node ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public IndexTemplateExistsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public IndexTemplateExistsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for TypeExists https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ ///Deprecated as of OpenSearch 2.0 public partial class TypeExistsDescriptor : RequestDescriptorBase, ITypeExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTypeExists; ////{index}/_mapping/{type} ///this parameter is required ///this parameter is required public TypeExistsDescriptor(Indices index, Names type): base(r => r.Required("index", index).Required("type", type)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected TypeExistsDescriptor(): base() { } // values part of the url path Indices ITypeExistsRequest.Index => Self.RouteValues.Get("index"); Names ITypeExistsRequest.Type => Self.RouteValues.Get("type"); ///A comma-separated list of index names; use `_all` to check the types across all indices public TypeExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public TypeExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public TypeExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public TypeExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public TypeExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public TypeExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public TypeExistsDescriptor Local(bool? local = true) => Qs("local", local); } ///Descriptor for Flush public partial class FlushDescriptor : RequestDescriptorBase, IFlushRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesFlush; ////_flush public FlushDescriptor(): base() { } ////{index}/_flush ///Optional, accepts null public FlushDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IFlushRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices public FlushDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public FlushDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public FlushDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public FlushDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public FlushDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///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) public FlushDescriptor Force(bool? force = true) => Qs("force", force); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public FlushDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///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. public FlushDescriptor WaitIfOngoing(bool? waitifongoing = true) => Qs("wait_if_ongoing", waitifongoing); } ///Descriptor for ForceMerge public partial class ForceMergeDescriptor : RequestDescriptorBase, IForceMergeRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesForceMerge; ////_forcemerge public ForceMergeDescriptor(): base() { } ////{index}/_forcemerge ///Optional, accepts null public ForceMergeDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IForceMergeRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public ForceMergeDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public ForceMergeDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public ForceMergeDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ForceMergeDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ForceMergeDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Specify whether the index should be flushed after performing the operation (default: true) public ForceMergeDescriptor Flush(bool? flush = true) => Qs("flush", flush); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ForceMergeDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///The number of segments the index should be merged into (default: dynamic) public ForceMergeDescriptor MaxNumSegments(long? maxnumsegments) => Qs("max_num_segments", maxnumsegments); ///Specify whether the operation should only expunge deleted documents public ForceMergeDescriptor OnlyExpungeDeletes(bool? onlyexpungedeletes = true) => Qs("only_expunge_deletes", onlyexpungedeletes); } ///Descriptor for Get https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/ public partial class GetIndexDescriptor : RequestDescriptorBase, IGetIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGet; ////{index} ///this parameter is required public GetIndexDescriptor(Indices index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected GetIndexDescriptor(): base() { } // values part of the url path Indices IGetIndexRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names public GetIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public GetIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public GetIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public GetIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public GetIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Return settings in flat format (default: false) public GetIndexDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Ignore unavailable indexes (default: false) public GetIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether to return all default setting for each of the indices. public GetIndexDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); ///Whether to add the type name to the response (default: false) ///Deprecated as of OpenSearch 2.0 public GetIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public GetIndexDescriptor Local(bool? local = true) => Qs("local", local); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public GetIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public GetIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for GetAlias https://opensearch.org/docs/latest/opensearch/rest-api/alias/ public partial class GetAliasDescriptor : RequestDescriptorBase, IGetAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetAlias; ////_alias public GetAliasDescriptor(): base() { } ////_alias/{name} ///Optional, accepts null public GetAliasDescriptor(Names name): base(r => r.Optional("name", name)) { } ////{index}/_alias/{name} ///Optional, accepts null ///Optional, accepts null public GetAliasDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Optional("name", name)) { } ////{index}/_alias ///Optional, accepts null public GetAliasDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Names IGetAliasRequest.Name => Self.RouteValues.Get("name"); Indices IGetAliasRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of alias names to return public GetAliasDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); ///A comma-separated list of index names to filter aliases public GetAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public GetAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public GetAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetAliasDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetAliasDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetAliasDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public GetAliasDescriptor Local(bool? local = true) => Qs("local", local); } ///Descriptor for GetFieldMapping https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ public partial class GetFieldMappingDescriptor : RequestDescriptorBase, GetFieldMappingRequestParameters, IGetFieldMappingRequest>, IGetFieldMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetFieldMapping; ////{index}/_mapping/field/{fields} ///this parameter is required public GetFieldMappingDescriptor(Fields fields): this(typeof(TDocument), fields) { } ////{index}/_mapping/field/{fields} ///Optional, accepts null ///this parameter is required public GetFieldMappingDescriptor(Indices index, Fields fields): base(r => r.Optional("index", index).Required("fields", fields)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected GetFieldMappingDescriptor(): base() { } // values part of the url path Fields IGetFieldMappingRequest.Fields => Self.RouteValues.Get("fields"); Indices IGetFieldMappingRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names public GetFieldMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public GetFieldMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public GetFieldMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetFieldMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetFieldMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetFieldMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether the default mapping values should be returned as well public GetFieldMappingDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); ///Whether a type should be returned in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public GetFieldMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public GetFieldMappingDescriptor Local(bool? local = true) => Qs("local", local); } ///Descriptor for GetMapping https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ public partial class GetMappingDescriptor : RequestDescriptorBase, GetMappingRequestParameters, IGetMappingRequest>, IGetMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetMapping; ////{index}/_mapping public GetMappingDescriptor(): this(typeof(TDocument)) { } ////{index}/_mapping ///Optional, accepts null public GetMappingDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IGetMappingRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names public GetMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public GetMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public GetMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether to add the type name to the response (default: false) ///Deprecated as of OpenSearch 2.0 public GetMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public GetMappingDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public GetMappingDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for GetSettings public partial class GetIndexSettingsDescriptor : RequestDescriptorBase, IGetIndexSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetSettings; ////_settings public GetIndexSettingsDescriptor(): base() { } ////{index}/_settings ///Optional, accepts null public GetIndexSettingsDescriptor(Indices index): base(r => r.Optional("index", index)) { } ////{index}/_settings/{name} ///Optional, accepts null ///Optional, accepts null public GetIndexSettingsDescriptor(Indices index, Names name): base(r => r.Optional("index", index).Optional("name", name)) { } ////_settings/{name} ///Optional, accepts null public GetIndexSettingsDescriptor(Names name): base(r => r.Optional("name", name)) { } // values part of the url path Indices IGetIndexSettingsRequest.Index => Self.RouteValues.Get("index"); Names IGetIndexSettingsRequest.Name => Self.RouteValues.Get("name"); ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public GetIndexSettingsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public GetIndexSettingsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public GetIndexSettingsDescriptor AllIndices() => Index(Indices.All); ///The name of the settings that should be included public GetIndexSettingsDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetIndexSettingsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetIndexSettingsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Return settings in flat format (default: false) public GetIndexSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetIndexSettingsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether to return all default setting for each of the indices. public GetIndexSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public GetIndexSettingsDescriptor Local(bool? local = true) => Qs("local", local); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public GetIndexSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public GetIndexSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for GetTemplate https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ public partial class GetIndexTemplateDescriptor : RequestDescriptorBase, IGetIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetTemplate; ////_template public GetIndexTemplateDescriptor(): base() { } ////_template/{name} ///Optional, accepts null public GetIndexTemplateDescriptor(Names name): base(r => r.Optional("name", name)) { } // values part of the url path Names IGetIndexTemplateRequest.Name => Self.RouteValues.Get("name"); ///The comma separated names of the index templates public GetIndexTemplateDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters ///Return settings in flat format (default: false) public GetIndexTemplateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Whether a type should be returned in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public GetIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Return local information, do not retrieve the state from cluster_manager node (default: false) public GetIndexTemplateDescriptor Local(bool? local = true) => Qs("local", local); ///Specify timeout for connection to master node ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public GetIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public GetIndexTemplateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for Open https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ public partial class OpenIndexDescriptor : RequestDescriptorBase, IOpenIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesOpen; ////{index}/_open ///this parameter is required public OpenIndexDescriptor(Indices index): base(r => r.Required("index", index)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected OpenIndexDescriptor(): base() { } // values part of the url path Indices IOpenIndexRequest.Index => Self.RouteValues.Get("index"); ///A comma separated list of indices to open public OpenIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public OpenIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public OpenIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public OpenIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public OpenIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public OpenIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public OpenIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public OpenIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public OpenIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Sets the number of active shards to wait for before the operation returns. public OpenIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for PutAlias https://opensearch.org/docs/latest/opensearch/rest-api/alias/ public partial class PutAliasDescriptor : RequestDescriptorBase, IPutAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutAlias; ////{index}/_alias/{name} ///this parameter is required ///this parameter is required public PutAliasDescriptor(Indices index, Name name): base(r => r.Required("index", index).Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected PutAliasDescriptor(): base() { } // values part of the url path Indices IPutAliasRequest.Index => Self.RouteValues.Get("index"); Name IPutAliasRequest.Name => Self.RouteValues.Get("name"); ///A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. public PutAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public PutAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public PutAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public PutAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public PutAliasDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit timestamp for the document public PutAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for PutMapping https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ public partial class PutMappingDescriptor : RequestDescriptorBase, PutMappingRequestParameters, IPutMappingRequest>, IPutMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutMapping; ////{index}/_mapping ///this parameter is required public PutMappingDescriptor(Indices index): base(r => r.Required("index", index)) { } ////{index}/_mapping public PutMappingDescriptor(): this(typeof(TDocument)) { } // values part of the url path Indices IPutMappingRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. public PutMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public PutMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public PutMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public PutMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public PutMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public PutMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Whether a type should be expected in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public PutMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public PutMappingDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public PutMappingDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public PutMappingDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///When true, applies mappings only to the write index of an alias public PutMappingDescriptor WriteIndexOnly(bool? writeindexonly = true) => Qs("write_index_only", writeindexonly); } ///Descriptor for UpdateSettings public partial class UpdateIndexSettingsDescriptor : RequestDescriptorBase, IUpdateIndexSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesUpdateSettings; ////_settings public UpdateIndexSettingsDescriptor(): base() { } ////{index}/_settings ///Optional, accepts null public UpdateIndexSettingsDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IUpdateIndexSettingsRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public UpdateIndexSettingsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public UpdateIndexSettingsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public UpdateIndexSettingsDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public UpdateIndexSettingsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public UpdateIndexSettingsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Return settings in flat format (default: false) public UpdateIndexSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public UpdateIndexSettingsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public UpdateIndexSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public UpdateIndexSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` public UpdateIndexSettingsDescriptor PreserveExisting(bool? preserveexisting = true) => Qs("preserve_existing", preserveexisting); ///Explicit operation timeout public UpdateIndexSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for PutTemplate https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ public partial class PutIndexTemplateDescriptor : RequestDescriptorBase, IPutIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutTemplate; ////_template/{name} ///this parameter is required public PutIndexTemplateDescriptor(Name name): base(r => r.Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected PutIndexTemplateDescriptor(): base() { } // values part of the url path Name IPutIndexTemplateRequest.Name => Self.RouteValues.Get("name"); // Request parameters ///Whether the index template should only be added if new or can also replace an existing one public PutIndexTemplateDescriptor Create(bool? create = true) => Qs("create", create); ///Whether a type should be returned in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public PutIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public PutIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public PutIndexTemplateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); } ///Descriptor for Refresh https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ public partial class RefreshDescriptor : RequestDescriptorBase, IRefreshRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesRefresh; ////_refresh public RefreshDescriptor(): base() { } ////{index}/_refresh ///Optional, accepts null public RefreshDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IRefreshRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public RefreshDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public RefreshDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public RefreshDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public RefreshDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public RefreshDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public RefreshDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); } ///Descriptor for Resolve public partial class ResolveIndexDescriptor : RequestDescriptorBase, IResolveIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesResolve; ////_resolve/index/{name} ///this parameter is required public ResolveIndexDescriptor(Names name): base(r => r.Required("name", name)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected ResolveIndexDescriptor(): base() { } // values part of the url path Names IResolveIndexRequest.Name => Self.RouteValues.Get("name"); // Request parameters ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public ResolveIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); } ///Descriptor for Rollover https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream public partial class RolloverIndexDescriptor : RequestDescriptorBase, IRolloverIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesRollover; ////{alias}/_rollover ///this parameter is required public RolloverIndexDescriptor(Name alias): base(r => r.Required("alias", alias)) { } ////{alias}/_rollover/{new_index} ///this parameter is required ///Optional, accepts null public RolloverIndexDescriptor(Name alias, IndexName newIndex): base(r => r.Required("alias", alias).Optional("new_index", newIndex)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected RolloverIndexDescriptor(): base() { } // values part of the url path Name IRolloverIndexRequest.Alias => Self.RouteValues.Get("alias"); IndexName IRolloverIndexRequest.NewIndex => Self.RouteValues.Get("new_index"); ///The name of the rollover index public RolloverIndexDescriptor NewIndex(IndexName newIndex) => Assign(newIndex, (a, v) => a.RouteValues.Optional("new_index", v)); // Request parameters ///If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false public RolloverIndexDescriptor DryRun(bool? dryrun = true) => Qs("dry_run", dryrun); ///Whether a type should be included in the body of the mappings. ///Deprecated as of OpenSearch 2.0 public RolloverIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public RolloverIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public RolloverIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public RolloverIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Set the number of active shards to wait for on the newly created rollover index before the operation returns. public RolloverIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for ShardStores public partial class IndicesShardStoresDescriptor : RequestDescriptorBase, IIndicesShardStoresRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesShardStores; ////_shard_stores public IndicesShardStoresDescriptor(): base() { } ////{index}/_shard_stores ///Optional, accepts null public IndicesShardStoresDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IIndicesShardStoresRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public IndicesShardStoresDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public IndicesShardStoresDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public IndicesShardStoresDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public IndicesShardStoresDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public IndicesShardStoresDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public IndicesShardStoresDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///A comma-separated list of statuses used to filter on shards to get store information for public IndicesShardStoresDescriptor Status(params string[] status) => Qs("status", status); } ///Descriptor for Shrink https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/ public partial class ShrinkIndexDescriptor : RequestDescriptorBase, IShrinkIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesShrink; ////{index}/_shrink/{target} ///this parameter is required ///this parameter is required public ShrinkIndexDescriptor(IndexName index, IndexName target): base(r => r.Required("index", index).Required("target", target)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected ShrinkIndexDescriptor(): base() { } // values part of the url path IndexName IShrinkIndexRequest.Index => Self.RouteValues.Get("index"); IndexName IShrinkIndexRequest.Target => Self.RouteValues.Get("target"); ///The name of the source index to shrink public ShrinkIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public ShrinkIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public ShrinkIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public ShrinkIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public ShrinkIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Set the number of active shards to wait for on the shrunken index before the operation returns. public ShrinkIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for Split https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/ public partial class SplitIndexDescriptor : RequestDescriptorBase, ISplitIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesSplit; ////{index}/_split/{target} ///this parameter is required ///this parameter is required public SplitIndexDescriptor(IndexName index, IndexName target): base(r => r.Required("index", index).Required("target", target)) { } ///Used for serialization purposes, making sure we have a parameterless constructor [SerializationConstructor] protected SplitIndexDescriptor(): base() { } // values part of the url path IndexName ISplitIndexRequest.Index => Self.RouteValues.Get("index"); IndexName ISplitIndexRequest.Target => Self.RouteValues.Get("target"); ///The name of the source index to split public SplitIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); ///a shortcut into calling Index(typeof(TOther)) public SplitIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public SplitIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public SplitIndexDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Explicit operation timeout public SplitIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); ///Set the number of active shards to wait for on the shrunken index before the operation returns. public SplitIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } ///Descriptor for BulkAlias https://opensearch.org/docs/latest/opensearch/rest-api/alias/ public partial class BulkAliasDescriptor : RequestDescriptorBase, IBulkAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesBulkAlias; // values part of the url path // Request parameters ///Specify timeout for connection to master node ///Deprecated as of OpenSearch 2.0, use instead public BulkAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Specify timeout for connection to cluster_manager node ///Introduced in OpenSearch 2.0 instead of public BulkAliasDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); ///Request timeout public BulkAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } ///Descriptor for ValidateQuery public partial class ValidateQueryDescriptor : RequestDescriptorBase, ValidateQueryRequestParameters, IValidateQueryRequest>, IValidateQueryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesValidateQuery; ////{index}/_validate/query public ValidateQueryDescriptor(): this(typeof(TDocument)) { } ////{index}/_validate/query ///Optional, accepts null public ValidateQueryDescriptor(Indices index): base(r => r.Optional("index", index)) { } // values part of the url path Indices IValidateQueryRequest.Index => Self.RouteValues.Get("index"); ///A comma-separated list of index names to restrict the operation; use the special string `_all` or Indices.All to perform the operation on all indices public ValidateQueryDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); ///a shortcut into calling Index(typeof(TOther)) public ValidateQueryDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); ///A shortcut into calling Index(Indices.All) public ValidateQueryDescriptor AllIndices() => Index(Indices.All); // Request parameters ///Execute validation on all shards instead of one random shard per index public ValidateQueryDescriptor AllShards(bool? allshards = true) => Qs("all_shards", allshards); ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ValidateQueryDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); ///Specify whether wildcard and prefix queries should be analyzed (default: false) public ValidateQueryDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); ///The analyzer to use for the query string public ValidateQueryDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); ///The default operator for query string query (AND or OR) public ValidateQueryDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); ///The field to use as default where no field prefix is given in the query string public ValidateQueryDescriptor Df(string df) => Qs("df", df); ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ValidateQueryDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); ///Return detailed information about the error public ValidateQueryDescriptor Explain(bool? explain = true) => Qs("explain", explain); ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ValidateQueryDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public ValidateQueryDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); ///Query in the Lucene query string syntax public ValidateQueryDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); ///Provide a more detailed explanation showing the actual Lucene query that will be executed. public ValidateQueryDescriptor Rewrite(bool? rewrite = true) => Qs("rewrite", rewrite); } }