/* 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.NodesApi;
// ReSharper disable once CheckNamespace
// ReSharper disable RedundantTypeArgumentsOfMethod
namespace OpenSearch.Client.Specification.NodesApi
{
///
/// Nodes APIs.
/// Not intended to be instantiated directly. Use the property
/// on .
///
///
public class NodesNamespace : NamespacedClientProxy
{
internal NodesNamespace(OpenSearchClient client): base(client)
{
}
///
/// GET request to the nodes.hot_threads API, read more about this API online:
///
///
///
public NodesHotThreadsResponse HotThreads(Func selector = null) => HotThreads(selector.InvokeOrDefault(new NodesHotThreadsDescriptor()));
///
/// GET request to the nodes.hot_threads API, read more about this API online:
///
///
///
public Task HotThreadsAsync(Func selector = null, CancellationToken ct = default) => HotThreadsAsync(selector.InvokeOrDefault(new NodesHotThreadsDescriptor()), ct);
///
/// GET request to the nodes.hot_threads API, read more about this API online:
///
///
///
public NodesHotThreadsResponse HotThreads(INodesHotThreadsRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the nodes.hot_threads API, read more about this API online:
///
///
///
public Task HotThreadsAsync(INodesHotThreadsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the nodes.info API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/
///
public NodesInfoResponse Info(Func selector = null) => Info(selector.InvokeOrDefault(new NodesInfoDescriptor()));
///
/// GET request to the nodes.info API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/
///
public Task InfoAsync(Func selector = null, CancellationToken ct = default) => InfoAsync(selector.InvokeOrDefault(new NodesInfoDescriptor()), ct);
///
/// GET request to the nodes.info API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/
///
public NodesInfoResponse Info(INodesInfoRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the nodes.info API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/
///
public Task InfoAsync(INodesInfoRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the nodes.reload_secure_settings API, read more about this API online:
///
///
///
public ReloadSecureSettingsResponse ReloadSecureSettings(Func selector = null) => ReloadSecureSettings(selector.InvokeOrDefault(new ReloadSecureSettingsDescriptor()));
///
/// POST request to the nodes.reload_secure_settings API, read more about this API online:
///
///
///
public Task ReloadSecureSettingsAsync(Func selector = null, CancellationToken ct = default) => ReloadSecureSettingsAsync(selector.InvokeOrDefault(new ReloadSecureSettingsDescriptor()), ct);
///
/// POST request to the nodes.reload_secure_settings API, read more about this API online:
///
///
///
public ReloadSecureSettingsResponse ReloadSecureSettings(IReloadSecureSettingsRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the nodes.reload_secure_settings API, read more about this API online:
///
///
///
public Task ReloadSecureSettingsAsync(IReloadSecureSettingsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the nodes.stats API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/stats-api/
///
public NodesStatsResponse Stats(Func selector = null) => Stats(selector.InvokeOrDefault(new NodesStatsDescriptor()));
///
/// GET request to the nodes.stats API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/stats-api/
///
public Task StatsAsync(Func selector = null, CancellationToken ct = default) => StatsAsync(selector.InvokeOrDefault(new NodesStatsDescriptor()), ct);
///
/// GET request to the nodes.stats API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/stats-api/
///
public NodesStatsResponse Stats(INodesStatsRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the nodes.stats API, read more about this API online:
///
/// https://opensearch.org/docs/latest/opensearch/stats-api/
///
public Task StatsAsync(INodesStatsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the nodes.usage API, read more about this API online:
///
///
///
public NodesUsageResponse Usage(Func selector = null) => Usage(selector.InvokeOrDefault(new NodesUsageDescriptor()));
///
/// GET request to the nodes.usage API, read more about this API online:
///
///
///
public Task UsageAsync(Func selector = null, CancellationToken ct = default) => UsageAsync(selector.InvokeOrDefault(new NodesUsageDescriptor()), ct);
///
/// GET request to the nodes.usage API, read more about this API online:
///
///
///
public NodesUsageResponse Usage(INodesUsageRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the nodes.usage API, read more about this API online:
///
///
///
public Task UsageAsync(INodesUsageRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
}
}