/* 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.Threading;
using System.Threading.Tasks;
using OpenSearch.Net.Specification.IndicesApi;
// ReSharper disable once CheckNamespace
// ReSharper disable RedundantTypeArgumentsOfMethod
namespace OpenSearch.Client.Specification.IndicesApi
{
///
/// Indices APIs.
/// Not intended to be instantiated directly. Use the property
/// on .
///
///
public class IndicesNamespace : NamespacedClientProxy
{
internal IndicesNamespace(OpenSearchClient client): base(client)
{
}
///
/// PUT request to the indices.add_block API, read more about this API online:
///
///
///
public AddIndexBlockResponse AddBlock(Indices index, IndexBlock block, Func selector = null) => AddBlock(selector.InvokeOrDefault(new AddIndexBlockDescriptor(index: index, block: block)));
///
/// PUT request to the indices.add_block API, read more about this API online:
///
///
///
public Task AddBlockAsync(Indices index, IndexBlock block, Func selector = null, CancellationToken ct = default) => AddBlockAsync(selector.InvokeOrDefault(new AddIndexBlockDescriptor(index: index, block: block)), ct);
///
/// PUT request to the indices.add_block API, read more about this API online:
///
///
///
public AddIndexBlockResponse AddBlock(IAddIndexBlockRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.add_block API, read more about this API online:
///
///
///
public Task AddBlockAsync(IAddIndexBlockRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.analyze API, read more about this API online:
///
///
///
public AnalyzeResponse Analyze(Func selector = null) => Analyze(selector.InvokeOrDefault(new AnalyzeDescriptor()));
///
/// POST request to the indices.analyze API, read more about this API online:
///
///
///
public Task AnalyzeAsync(Func selector = null, CancellationToken ct = default) => AnalyzeAsync(selector.InvokeOrDefault(new AnalyzeDescriptor()), ct);
///
/// POST request to the indices.analyze API, read more about this API online:
///
///
///
public AnalyzeResponse Analyze(IAnalyzeRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.analyze API, read more about this API online:
///
///
///
public Task AnalyzeAsync(IAnalyzeRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.clear_cache API, read more about this API online:
///
///
///
public ClearCacheResponse ClearCache(Indices index = null, Func selector = null) => ClearCache(selector.InvokeOrDefault(new ClearCacheDescriptor().Index(index: index)));
///
/// POST request to the indices.clear_cache API, read more about this API online:
///
///
///
public Task ClearCacheAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => ClearCacheAsync(selector.InvokeOrDefault(new ClearCacheDescriptor().Index(index: index)), ct);
///
/// POST request to the indices.clear_cache API, read more about this API online:
///
///
///
public ClearCacheResponse ClearCache(IClearCacheRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.clear_cache API, read more about this API online:
///
///
///
public Task ClearCacheAsync(IClearCacheRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.clone API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/
///
public CloneIndexResponse Clone(IndexName index, IndexName target, Func selector = null) => Clone(selector.InvokeOrDefault(new CloneIndexDescriptor(index: index, target: target)));
///
/// PUT request to the indices.clone API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/
///
public Task CloneAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default) => CloneAsync(selector.InvokeOrDefault(new CloneIndexDescriptor(index: index, target: target)), ct);
///
/// PUT request to the indices.clone API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/
///
public CloneIndexResponse Clone(ICloneIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.clone API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/
///
public Task CloneAsync(ICloneIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.close API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public CloseIndexResponse Close(Indices index, Func selector = null) => Close(selector.InvokeOrDefault(new CloseIndexDescriptor(index: index)));
///
/// POST request to the indices.close API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public Task CloseAsync(Indices index, Func selector = null, CancellationToken ct = default) => CloseAsync(selector.InvokeOrDefault(new CloseIndexDescriptor(index: index)), ct);
///
/// POST request to the indices.close API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public CloseIndexResponse Close(ICloseIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.close API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public Task CloseAsync(ICloseIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.create API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/
///
public CreateIndexResponse Create(IndexName index, Func selector = null) => Create(selector.InvokeOrDefault(new CreateIndexDescriptor(index: index)));
///
/// PUT request to the indices.create API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/
///
public Task CreateAsync(IndexName index, Func selector = null, CancellationToken ct = default) => CreateAsync(selector.InvokeOrDefault(new CreateIndexDescriptor(index: index)), ct);
///
/// PUT request to the indices.create API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/
///
public CreateIndexResponse Create(ICreateIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.create API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/
///
public Task CreateAsync(ICreateIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// DELETE request to the indices.delete API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/
///
public DeleteIndexResponse Delete(Indices index, Func selector = null) => Delete(selector.InvokeOrDefault(new DeleteIndexDescriptor(index: index)));
///
/// DELETE request to the indices.delete API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/
///
public Task DeleteAsync(Indices index, Func selector = null, CancellationToken ct = default) => DeleteAsync(selector.InvokeOrDefault(new DeleteIndexDescriptor(index: index)), ct);
///
/// DELETE request to the indices.delete API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/
///
public DeleteIndexResponse Delete(IDeleteIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// DELETE request to the indices.delete API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/
///
public Task DeleteAsync(IDeleteIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// DELETE request to the indices.delete_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public DeleteAliasResponse DeleteAlias(Indices index, Names name, Func selector = null) => DeleteAlias(selector.InvokeOrDefault(new DeleteAliasDescriptor(index: index, name: name)));
///
/// DELETE request to the indices.delete_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task DeleteAliasAsync(Indices index, Names name, Func selector = null, CancellationToken ct = default) => DeleteAliasAsync(selector.InvokeOrDefault(new DeleteAliasDescriptor(index: index, name: name)), ct);
///
/// DELETE request to the indices.delete_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public DeleteAliasResponse DeleteAlias(IDeleteAliasRequest request) => DoRequest(request, request.RequestParameters);
///
/// DELETE request to the indices.delete_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task DeleteAliasAsync(IDeleteAliasRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// DELETE request to the indices.delete_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public DeleteIndexTemplateResponse DeleteTemplate(Name name, Func selector = null) => DeleteTemplate(selector.InvokeOrDefault(new DeleteIndexTemplateDescriptor(name: name)));
///
/// DELETE request to the indices.delete_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task DeleteTemplateAsync(Name name, Func selector = null, CancellationToken ct = default) => DeleteTemplateAsync(selector.InvokeOrDefault(new DeleteIndexTemplateDescriptor(name: name)), ct);
///
/// DELETE request to the indices.delete_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public DeleteIndexTemplateResponse DeleteTemplate(IDeleteIndexTemplateRequest request) => DoRequest(request, request.RequestParameters);
///
/// DELETE request to the indices.delete_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task DeleteTemplateAsync(IDeleteIndexTemplateRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// HEAD request to the indices.exists API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
public ExistsResponse Exists(Indices index, Func selector = null) => Exists(selector.InvokeOrDefault(new IndexExistsDescriptor(index: index)));
///
/// HEAD request to the indices.exists API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
public Task ExistsAsync(Indices index, Func selector = null, CancellationToken ct = default) => ExistsAsync(selector.InvokeOrDefault(new IndexExistsDescriptor(index: index)), ct);
///
/// HEAD request to the indices.exists API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
public ExistsResponse Exists(IIndexExistsRequest request) => DoRequest(request, request.RequestParameters);
///
/// HEAD request to the indices.exists API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
public Task ExistsAsync(IIndexExistsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// HEAD request to the indices.exists_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public ExistsResponse AliasExists(Names name, Func selector = null) => AliasExists(selector.InvokeOrDefault(new AliasExistsDescriptor(name: name)));
///
/// HEAD request to the indices.exists_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task AliasExistsAsync(Names name, Func selector = null, CancellationToken ct = default) => AliasExistsAsync(selector.InvokeOrDefault(new AliasExistsDescriptor(name: name)), ct);
///
/// HEAD request to the indices.exists_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public ExistsResponse AliasExists(IAliasExistsRequest request) => DoRequest(request, request.RequestParameters);
///
/// HEAD request to the indices.exists_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task AliasExistsAsync(IAliasExistsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// HEAD request to the indices.exists_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public ExistsResponse TemplateExists(Names name, Func selector = null) => TemplateExists(selector.InvokeOrDefault(new IndexTemplateExistsDescriptor(name: name)));
///
/// HEAD request to the indices.exists_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task TemplateExistsAsync(Names name, Func selector = null, CancellationToken ct = default) => TemplateExistsAsync(selector.InvokeOrDefault(new IndexTemplateExistsDescriptor(name: name)), ct);
///
/// HEAD request to the indices.exists_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public ExistsResponse TemplateExists(IIndexTemplateExistsRequest request) => DoRequest(request, request.RequestParameters);
///
/// HEAD request to the indices.exists_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task TemplateExistsAsync(IIndexTemplateExistsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// HEAD request to the indices.exists_type API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
/// Deprecated as of OpenSearch 2.0
public ExistsResponse TypeExists(Indices index, Names type, Func selector = null) => TypeExists(selector.InvokeOrDefault(new TypeExistsDescriptor(index: index, type: type)));
///
/// HEAD request to the indices.exists_type API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
/// Deprecated as of OpenSearch 2.0
public Task TypeExistsAsync(Indices index, Names type, Func selector = null, CancellationToken ct = default) => TypeExistsAsync(selector.InvokeOrDefault(new TypeExistsDescriptor(index: index, type: type)), ct);
///
/// HEAD request to the indices.exists_type API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
/// Deprecated as of OpenSearch 2.0
public ExistsResponse TypeExists(ITypeExistsRequest request) => DoRequest(request, request.RequestParameters);
///
/// HEAD request to the indices.exists_type API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/
///
/// Deprecated as of OpenSearch 2.0
public Task TypeExistsAsync(ITypeExistsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.flush API, read more about this API online:
///
///
///
public FlushResponse Flush(Indices index = null, Func selector = null) => Flush(selector.InvokeOrDefault(new FlushDescriptor().Index(index: index)));
///
/// POST request to the indices.flush API, read more about this API online:
///
///
///
public Task FlushAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => FlushAsync(selector.InvokeOrDefault(new FlushDescriptor().Index(index: index)), ct);
///
/// POST request to the indices.flush API, read more about this API online:
///
///
///
public FlushResponse Flush(IFlushRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.flush API, read more about this API online:
///
///
///
public Task FlushAsync(IFlushRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.forcemerge API, read more about this API online:
///
///
///
public ForceMergeResponse ForceMerge(Indices index = null, Func selector = null) => ForceMerge(selector.InvokeOrDefault(new ForceMergeDescriptor().Index(index: index)));
///
/// POST request to the indices.forcemerge API, read more about this API online:
///
///
///
public Task ForceMergeAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => ForceMergeAsync(selector.InvokeOrDefault(new ForceMergeDescriptor().Index(index: index)), ct);
///
/// POST request to the indices.forcemerge API, read more about this API online:
///
///
///
public ForceMergeResponse ForceMerge(IForceMergeRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.forcemerge API, read more about this API online:
///
///
///
public Task ForceMergeAsync(IForceMergeRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/
///
public GetIndexResponse Get(Indices index, Func selector = null) => Get(selector.InvokeOrDefault(new GetIndexDescriptor(index: index)));
///
/// GET request to the indices.get API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/
///
public Task GetAsync(Indices index, Func selector = null, CancellationToken ct = default) => GetAsync(selector.InvokeOrDefault(new GetIndexDescriptor(index: index)), ct);
///
/// GET request to the indices.get API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/
///
public GetIndexResponse Get(IGetIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/
///
public Task GetAsync(IGetIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public GetAliasResponse GetAlias(Indices index = null, Func selector = null) => GetAlias(selector.InvokeOrDefault(new GetAliasDescriptor().Index(index: index)));
///
/// GET request to the indices.get_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task GetAliasAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => GetAliasAsync(selector.InvokeOrDefault(new GetAliasDescriptor().Index(index: index)), ct);
///
/// GET request to the indices.get_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public GetAliasResponse GetAlias(IGetAliasRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task GetAliasAsync(IGetAliasRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get_field_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public GetFieldMappingResponse GetFieldMapping(Fields fields, Func, IGetFieldMappingRequest> selector = null)
where TDocument : class => GetFieldMapping(selector.InvokeOrDefault(new GetFieldMappingDescriptor(fields: fields)));
///
/// GET request to the indices.get_field_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task GetFieldMappingAsync(Fields fields, Func, IGetFieldMappingRequest> selector = null, CancellationToken ct = default)
where TDocument : class => GetFieldMappingAsync(selector.InvokeOrDefault(new GetFieldMappingDescriptor(fields: fields)), ct);
///
/// GET request to the indices.get_field_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public GetFieldMappingResponse GetFieldMapping(IGetFieldMappingRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get_field_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task GetFieldMappingAsync(IGetFieldMappingRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public GetMappingResponse GetMapping(Func, IGetMappingRequest> selector = null)
where TDocument : class => GetMapping(selector.InvokeOrDefault(new GetMappingDescriptor()));
///
/// GET request to the indices.get_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task GetMappingAsync(Func, IGetMappingRequest> selector = null, CancellationToken ct = default)
where TDocument : class => GetMappingAsync(selector.InvokeOrDefault(new GetMappingDescriptor()), ct);
///
/// GET request to the indices.get_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public GetMappingResponse GetMapping(IGetMappingRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task GetMappingAsync(IGetMappingRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get_settings API, read more about this API online:
///
///
///
public GetIndexSettingsResponse GetSettings(Indices index = null, Func selector = null) => GetSettings(selector.InvokeOrDefault(new GetIndexSettingsDescriptor().Index(index: index)));
///
/// GET request to the indices.get_settings API, read more about this API online:
///
///
///
public Task GetSettingsAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => GetSettingsAsync(selector.InvokeOrDefault(new GetIndexSettingsDescriptor().Index(index: index)), ct);
///
/// GET request to the indices.get_settings API, read more about this API online:
///
///
///
public GetIndexSettingsResponse GetSettings(IGetIndexSettingsRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get_settings API, read more about this API online:
///
///
///
public Task GetSettingsAsync(IGetIndexSettingsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.get_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public GetIndexTemplateResponse GetTemplate(Names name = null, Func selector = null) => GetTemplate(selector.InvokeOrDefault(new GetIndexTemplateDescriptor().Name(name: name)));
///
/// GET request to the indices.get_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task GetTemplateAsync(Names name = null, Func selector = null, CancellationToken ct = default) => GetTemplateAsync(selector.InvokeOrDefault(new GetIndexTemplateDescriptor().Name(name: name)), ct);
///
/// GET request to the indices.get_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public GetIndexTemplateResponse GetTemplate(IGetIndexTemplateRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.get_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task GetTemplateAsync(IGetIndexTemplateRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.open API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public OpenIndexResponse Open(Indices index, Func selector = null) => Open(selector.InvokeOrDefault(new OpenIndexDescriptor(index: index)));
///
/// POST request to the indices.open API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public Task OpenAsync(Indices index, Func selector = null, CancellationToken ct = default) => OpenAsync(selector.InvokeOrDefault(new OpenIndexDescriptor(index: index)), ct);
///
/// POST request to the indices.open API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public OpenIndexResponse Open(IOpenIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.open API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/
///
public Task OpenAsync(IOpenIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.put_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public PutAliasResponse PutAlias(Indices index, Name name, Func selector = null) => PutAlias(selector.InvokeOrDefault(new PutAliasDescriptor(index: index, name: name)));
///
/// PUT request to the indices.put_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task PutAliasAsync(Indices index, Name name, Func selector = null, CancellationToken ct = default) => PutAliasAsync(selector.InvokeOrDefault(new PutAliasDescriptor(index: index, name: name)), ct);
///
/// PUT request to the indices.put_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public PutAliasResponse PutAlias(IPutAliasRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.put_alias API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task PutAliasAsync(IPutAliasRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.put_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public PutMappingResponse PutMapping(Func, IPutMappingRequest> selector)
where TDocument : class => PutMapping(selector.InvokeOrDefault(new PutMappingDescriptor()));
///
/// PUT request to the indices.put_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task PutMappingAsync(Func, IPutMappingRequest> selector, CancellationToken ct = default)
where TDocument : class => PutMappingAsync(selector.InvokeOrDefault(new PutMappingDescriptor()), ct);
///
/// PUT request to the indices.put_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public PutMappingResponse PutMapping(IPutMappingRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.put_mapping API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/
///
public Task PutMappingAsync(IPutMappingRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.put_settings API, read more about this API online:
///
///
///
public UpdateIndexSettingsResponse UpdateSettings(Indices index, Func selector) => UpdateSettings(selector.InvokeOrDefault(new UpdateIndexSettingsDescriptor().Index(index: index)));
///
/// PUT request to the indices.put_settings API, read more about this API online:
///
///
///
public Task UpdateSettingsAsync(Indices index, Func selector, CancellationToken ct = default) => UpdateSettingsAsync(selector.InvokeOrDefault(new UpdateIndexSettingsDescriptor().Index(index: index)), ct);
///
/// PUT request to the indices.put_settings API, read more about this API online:
///
///
///
public UpdateIndexSettingsResponse UpdateSettings(IUpdateIndexSettingsRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.put_settings API, read more about this API online:
///
///
///
public Task UpdateSettingsAsync(IUpdateIndexSettingsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.put_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public PutIndexTemplateResponse PutTemplate(Name name, Func selector) => PutTemplate(selector.InvokeOrDefault(new PutIndexTemplateDescriptor(name: name)));
///
/// PUT request to the indices.put_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task PutTemplateAsync(Name name, Func selector, CancellationToken ct = default) => PutTemplateAsync(selector.InvokeOrDefault(new PutIndexTemplateDescriptor(name: name)), ct);
///
/// PUT request to the indices.put_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public PutIndexTemplateResponse PutTemplate(IPutIndexTemplateRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.put_template API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/
///
public Task PutTemplateAsync(IPutIndexTemplateRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.recovery API, read more about this API online:
///
///
///
public RefreshResponse Refresh(Indices index = null, Func selector = null) => Refresh(selector.InvokeOrDefault(new RefreshDescriptor().Index(index: index)));
///
/// POST request to the indices.refresh API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/
///
public Task RefreshAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => RefreshAsync(selector.InvokeOrDefault(new RefreshDescriptor().Index(index: index)), ct);
///
/// POST request to the indices.refresh API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/
///
public RefreshResponse Refresh(IRefreshRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.refresh API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/
///
public Task RefreshAsync(IRefreshRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.resolve_index API, read more about this API online:
///
///
public ResolveIndexResponse Resolve(Names name, Func selector = null) => Resolve(selector.InvokeOrDefault(new ResolveIndexDescriptor(name: name)));
///
/// GET request to the indices.resolve_index API, read more about this API online:
///
///
public Task ResolveAsync(Names name, Func selector = null, CancellationToken ct = default) => ResolveAsync(selector.InvokeOrDefault(new ResolveIndexDescriptor(name: name)), ct);
///
/// GET request to the indices.resolve_index API, read more about this API online:
///
///
public ResolveIndexResponse Resolve(IResolveIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the indices.resolve_index API, read more about this API online:
///
///
public Task ResolveAsync(IResolveIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.rollover API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream
///
public RolloverIndexResponse Rollover(Name alias, Func selector = null) => Rollover(selector.InvokeOrDefault(new RolloverIndexDescriptor(alias: alias)));
///
/// POST request to the indices.rollover API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream
///
public Task RolloverAsync(Name alias, Func selector = null, CancellationToken ct = default) => RolloverAsync(selector.InvokeOrDefault(new RolloverIndexDescriptor(alias: alias)), ct);
///
/// POST request to the indices.rollover API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream
///
public RolloverIndexResponse Rollover(IRolloverIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.rollover API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream
///
public Task RolloverAsync(IRolloverIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.segments API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/
///
public ShrinkIndexResponse Shrink(IndexName index, IndexName target, Func selector = null) => Shrink(selector.InvokeOrDefault(new ShrinkIndexDescriptor(index: index, target: target)));
///
/// PUT request to the indices.shrink API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/
///
public Task ShrinkAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default) => ShrinkAsync(selector.InvokeOrDefault(new ShrinkIndexDescriptor(index: index, target: target)), ct);
///
/// PUT request to the indices.shrink API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/
///
public ShrinkIndexResponse Shrink(IShrinkIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.shrink API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/
///
public Task ShrinkAsync(IShrinkIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the indices.split API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/
///
public SplitIndexResponse Split(IndexName index, IndexName target, Func selector = null) => Split(selector.InvokeOrDefault(new SplitIndexDescriptor(index: index, target: target)));
///
/// PUT request to the indices.split API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/
///
public Task SplitAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default) => SplitAsync(selector.InvokeOrDefault(new SplitIndexDescriptor(index: index, target: target)), ct);
///
/// PUT request to the indices.split API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/
///
public SplitIndexResponse Split(ISplitIndexRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the indices.split API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/
///
public Task SplitAsync(ISplitIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the indices.stats API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/stats-api/
///
public BulkAliasResponse BulkAlias(Func selector) => BulkAlias(selector.InvokeOrDefault(new BulkAliasDescriptor()));
///
/// POST request to the indices.update_aliases API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task BulkAliasAsync(Func selector, CancellationToken ct = default) => BulkAliasAsync(selector.InvokeOrDefault(new BulkAliasDescriptor()), ct);
///
/// POST request to the indices.update_aliases API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public BulkAliasResponse BulkAlias(IBulkAliasRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.update_aliases API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/alias/
///
public Task BulkAliasAsync(IBulkAliasRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the indices.validate_query API, read more about this API online:
///
///
///
public ValidateQueryResponse ValidateQuery(Func, IValidateQueryRequest> selector = null)
where TDocument : class => ValidateQuery(selector.InvokeOrDefault(new ValidateQueryDescriptor()));
///
/// POST request to the indices.validate_query API, read more about this API online:
///
///
///
public Task ValidateQueryAsync(Func, IValidateQueryRequest> selector = null, CancellationToken ct = default)
where TDocument : class => ValidateQueryAsync(selector.InvokeOrDefault(new ValidateQueryDescriptor()), ct);
///
/// POST request to the indices.validate_query API, read more about this API online:
///
///
///
public ValidateQueryResponse ValidateQuery(IValidateQueryRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the indices.validate_query API, read more about this API online:
///
///
///
public Task ValidateQueryAsync(IValidateQueryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
}
}