/* 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.NodesApi;
// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.NodesApi
{
///Descriptor for HotThreads
public partial class NodesHotThreadsDescriptor : RequestDescriptorBase, INodesHotThreadsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
////_nodes/hot_threads
public NodesHotThreadsDescriptor(): base()
{
}
////_nodes/{node_id}/hot_threads
///Optional, accepts null
public NodesHotThreadsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
// values part of the url path
NodeIds INodesHotThreadsRequest.NodeId => Self.RouteValues.Get("node_id");
///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
public NodesHotThreadsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
// Request parameters
///Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
public NodesHotThreadsDescriptor IgnoreIdleThreads(bool? ignoreidlethreads = true) => Qs("ignore_idle_threads", ignoreidlethreads);
///The interval for the second sampling of threads
public NodesHotThreadsDescriptor Interval(Time interval) => Qs("interval", interval);
///Number of samples of thread stacktrace (default: 10)
public NodesHotThreadsDescriptor Snapshots(long? snapshots) => Qs("snapshots", snapshots);
///The type to sample (default: cpu)
public NodesHotThreadsDescriptor ThreadType(ThreadType? threadtype) => Qs("type", threadtype);
///Specify the number of threads to provide information for (default: 3)
public NodesHotThreadsDescriptor Threads(long? threads) => Qs("threads", threads);
///Explicit operation timeout
public NodesHotThreadsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for Info https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/
public partial class NodesInfoDescriptor : RequestDescriptorBase, INodesInfoRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesInfo;
////_nodes
public NodesInfoDescriptor(): base()
{
}
////_nodes/{node_id}
///Optional, accepts null
public NodesInfoDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
////_nodes/{metric}
///Optional, accepts null
public NodesInfoDescriptor(Metrics metric): base(r => r.Optional("metric", metric))
{
}
////_nodes/{node_id}/{metric}
///Optional, accepts null
///Optional, accepts null
public NodesInfoDescriptor(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
{
}
// values part of the url path
NodeIds INodesInfoRequest.NodeId => Self.RouteValues.Get("node_id");
Metrics INodesInfoRequest.Metric => Self.RouteValues.Get("metric");
///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
public NodesInfoDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
///A comma-separated list of metrics you wish returned. Leave empty to return all.
public NodesInfoDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v));
// Request parameters
///Return settings in flat format (default: false)
public NodesInfoDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///Explicit operation timeout
public NodesInfoDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for ReloadSecureSettings
public partial class ReloadSecureSettingsDescriptor : RequestDescriptorBase, IReloadSecureSettingsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesReloadSecureSettings;
////_nodes/reload_secure_settings
public ReloadSecureSettingsDescriptor(): base()
{
}
////_nodes/{node_id}/reload_secure_settings
///Optional, accepts null
public ReloadSecureSettingsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
// values part of the url path
NodeIds IReloadSecureSettingsRequest.NodeId => Self.RouteValues.Get("node_id");
///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
public ReloadSecureSettingsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
// Request parameters
///Explicit operation timeout
public ReloadSecureSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for Stats https://opensearch.org/docs/latest/opensearch/stats-api/
public partial class NodesStatsDescriptor : RequestDescriptorBase, INodesStatsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesStats;
////_nodes/stats
public NodesStatsDescriptor(): base()
{
}
////_nodes/{node_id}/stats
///Optional, accepts null
public NodesStatsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
////_nodes/stats/{metric}
///Optional, accepts null
public NodesStatsDescriptor(Metrics metric): base(r => r.Optional("metric", metric))
{
}
////_nodes/{node_id}/stats/{metric}
///Optional, accepts null
///Optional, accepts null
public NodesStatsDescriptor(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
{
}
////_nodes/stats/{metric}/{index_metric}
///Optional, accepts null
///Optional, accepts null
public NodesStatsDescriptor(Metrics metric, IndexMetrics indexMetric): base(r => r.Optional("metric", metric).Optional("index_metric", indexMetric))
{
}
////_nodes/{node_id}/stats/{metric}/{index_metric}
///Optional, accepts null
///Optional, accepts null
///Optional, accepts null
public NodesStatsDescriptor(NodeIds nodeId, Metrics metric, IndexMetrics indexMetric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric).Optional("index_metric", indexMetric))
{
}
// values part of the url path
NodeIds INodesStatsRequest.NodeId => Self.RouteValues.Get("node_id");
Metrics INodesStatsRequest.Metric => Self.RouteValues.Get("metric");
IndexMetrics INodesStatsRequest.IndexMetric => Self.RouteValues.Get("index_metric");
///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
public NodesStatsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
///Limit the information returned to the specified metrics
public NodesStatsDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v));
///Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
public NodesStatsDescriptor IndexMetric(IndexMetrics indexMetric) => Assign(indexMetric, (a, v) => a.RouteValues.Optional("index_metric", v));
// Request parameters
///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
public NodesStatsDescriptor CompletionFields(Fields completionfields) => Qs("completion_fields", completionfields);
///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
public NodesStatsDescriptor CompletionFields(params Expression>[] fields)
where T : class => Qs("completion_fields", fields?.Select(e => (Field)e));
///A comma-separated list of fields for `fielddata` index metric (supports wildcards)
public NodesStatsDescriptor FielddataFields(Fields fielddatafields) => Qs("fielddata_fields", fielddatafields);
///A comma-separated list of fields for `fielddata` index metric (supports wildcards)
public NodesStatsDescriptor FielddataFields(params Expression>[] fields)
where T : class => Qs("fielddata_fields", fields?.Select(e => (Field)e));
///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
public NodesStatsDescriptor Fields(Fields fields) => Qs("fields", fields);
///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
public NodesStatsDescriptor Fields(params Expression>[] fields)
where T : class => Qs("fields", fields?.Select(e => (Field)e));
///A comma-separated list of search groups for `search` index metric
public NodesStatsDescriptor Groups(bool? groups = true) => Qs("groups", groups);
///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
public NodesStatsDescriptor IncludeSegmentFileSizes(bool? includesegmentfilesizes = true) => Qs("include_segment_file_sizes", includesegmentfilesizes);
///Return indices stats aggregated at index, node or shard level
public NodesStatsDescriptor Level(Level? level) => Qs("level", level);
///Explicit operation timeout
public NodesStatsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///A comma-separated list of document types for the `indexing` index metric
public NodesStatsDescriptor Types(params string[] types) => Qs("types", types);
}
///Descriptor for Usage
public partial class NodesUsageDescriptor : RequestDescriptorBase, INodesUsageRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesUsage;
////_nodes/usage
public NodesUsageDescriptor(): base()
{
}
////_nodes/{node_id}/usage
///Optional, accepts null
public NodesUsageDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
////_nodes/usage/{metric}
///Optional, accepts null
public NodesUsageDescriptor(Metrics metric): base(r => r.Optional("metric", metric))
{
}
////_nodes/{node_id}/usage/{metric}
///Optional, accepts null
///Optional, accepts null
public NodesUsageDescriptor(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
{
}
// values part of the url path
NodeIds INodesUsageRequest.NodeId => Self.RouteValues.Get("node_id");
Metrics INodesUsageRequest.Metric => Self.RouteValues.Get("metric");
///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
public NodesUsageDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
///Limit the information returned to the specified metrics
public NodesUsageDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v));
// Request parameters
///Explicit operation timeout
public NodesUsageDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
}