/* 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.ClusterApi;
// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
///Descriptor for AllocationExplain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
public partial class ClusterAllocationExplainDescriptor : RequestDescriptorBase, IClusterAllocationExplainRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterAllocationExplain;
// values part of the url path
// Request parameters
///Return information about disk usage and shard sizes (default: false)
public ClusterAllocationExplainDescriptor IncludeDiskInfo(bool? includediskinfo = true) => Qs("include_disk_info", includediskinfo);
///Return 'YES' decisions in explanation (default: false)
public ClusterAllocationExplainDescriptor IncludeYesDecisions(bool? includeyesdecisions = true) => Qs("include_yes_decisions", includeyesdecisions);
}
///Descriptor for DeleteVotingConfigExclusions
public partial class DeleteVotingConfigExclusionsDescriptor : RequestDescriptorBase, IDeleteVotingConfigExclusionsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
// values part of the url path
// Request parameters
///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
public DeleteVotingConfigExclusionsDescriptor WaitForRemoval(bool? waitforremoval = true) => Qs("wait_for_removal", waitforremoval);
}
///Descriptor for GetSettings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
public partial class ClusterGetSettingsDescriptor : RequestDescriptorBase, IClusterGetSettingsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
// values part of the url path
// Request parameters
///Return settings in flat format (default: false)
public ClusterGetSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///Whether to return all default clusters setting.
public ClusterGetSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterGetSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterGetSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///Explicit operation timeout
public ClusterGetSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for Health https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
public partial class ClusterHealthDescriptor : RequestDescriptorBase, IClusterHealthRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
////_cluster/health
public ClusterHealthDescriptor(): base()
{
}
////_cluster/health/{index}
///Optional, accepts null
public ClusterHealthDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IClusterHealthRequest.Index => Self.RouteValues.Get("index");
///Limit the information returned to a specific index
public ClusterHealthDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///a shortcut into calling Index(typeof(TOther))
public ClusterHealthDescriptor Index()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///A shortcut into calling Index(Indices.All)
public ClusterHealthDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///Whether to expand wildcard expression to concrete indices that are open, closed or both.
public ClusterHealthDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///Specify the level of detail for returned information
public ClusterHealthDescriptor Level(Level? level) => Qs("level", level);
///Return local information, do not retrieve the state from cluster_manager node (default: false)
public ClusterHealthDescriptor Local(bool? local = true) => Qs("local", local);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterHealthDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterHealthDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///Explicit operation timeout
public ClusterHealthDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///Wait until the specified number of shards is active
public ClusterHealthDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
///Wait until all currently queued events with the given priority are processed
public ClusterHealthDescriptor WaitForEvents(WaitForEvents? waitforevents) => Qs("wait_for_events", waitforevents);
///Whether to wait until there are no initializing shards in the cluster
public ClusterHealthDescriptor WaitForNoInitializingShards(bool? waitfornoinitializingshards = true) => Qs("wait_for_no_initializing_shards", waitfornoinitializingshards);
///Whether to wait until there are no relocating shards in the cluster
public ClusterHealthDescriptor WaitForNoRelocatingShards(bool? waitfornorelocatingshards = true) => Qs("wait_for_no_relocating_shards", waitfornorelocatingshards);
///Wait until the specified number of nodes is available
public ClusterHealthDescriptor WaitForNodes(string waitfornodes) => Qs("wait_for_nodes", waitfornodes);
///Wait until cluster is in a specific state
public ClusterHealthDescriptor WaitForStatus(WaitForStatus? waitforstatus) => Qs("wait_for_status", waitforstatus);
}
///Descriptor for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
public partial class ClusterPendingTasksDescriptor : RequestDescriptorBase, IClusterPendingTasksRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
// values part of the url path
// Request parameters
///Return local information, do not retrieve the state from cluster_manager node (default: false)
public ClusterPendingTasksDescriptor Local(bool? local = true) => Qs("local", local);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}
///Descriptor for PostVotingConfigExclusions
public partial class PostVotingConfigExclusionsDescriptor : RequestDescriptorBase, IPostVotingConfigExclusionsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPostVotingConfigExclusions;
// values part of the url path
// Request parameters
///A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.
public PostVotingConfigExclusionsDescriptor NodeIds(string nodeids) => Qs("node_ids", nodeids);
///A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.
public PostVotingConfigExclusionsDescriptor NodeNames(string nodenames) => Qs("node_names", nodenames);
///Explicit operation timeout
public PostVotingConfigExclusionsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for PutSettings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
public partial class ClusterPutSettingsDescriptor : RequestDescriptorBase, IClusterPutSettingsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPutSettings;
// values part of the url path
// Request parameters
///Return settings in flat format (default: false)
public ClusterPutSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterPutSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterPutSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///Explicit operation timeout
public ClusterPutSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for RemoteInfo https://opensearch.org/docs/latest/opensearch/rest-api/remote-info/
public partial class RemoteInfoDescriptor : RequestDescriptorBase, IRemoteInfoRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterRemoteInfo;
// values part of the url path
// Request parameters
}
///Descriptor for Reroute
public partial class ClusterRerouteDescriptor : RequestDescriptorBase, IClusterRerouteRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterReroute;
// values part of the url path
// Request parameters
///Simulate the operation only and return the resulting state
public ClusterRerouteDescriptor DryRun(bool? dryrun = true) => Qs("dry_run", dryrun);
///Return an explanation of why the commands can or cannot be executed
public ClusterRerouteDescriptor Explain(bool? explain = true) => Qs("explain", explain);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterRerouteDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterRerouteDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///Limit the information returned to the specified metrics. Defaults to all but metadata
public ClusterRerouteDescriptor Metric(params string[] metric) => Qs("metric", metric);
///Retries allocation of shards that are blocked due to too many subsequent allocation failures
public ClusterRerouteDescriptor RetryFailed(bool? retryfailed = true) => Qs("retry_failed", retryfailed);
///Explicit operation timeout
public ClusterRerouteDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///Descriptor for State
public partial class ClusterStateDescriptor : RequestDescriptorBase, IClusterStateRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterState;
////_cluster/state
public ClusterStateDescriptor(): base()
{
}
////_cluster/state/{metric}
///Optional, accepts null
public ClusterStateDescriptor(Metrics metric): base(r => r.Optional("metric", metric))
{
}
////_cluster/state/{metric}/{index}
///Optional, accepts null
///Optional, accepts null
public ClusterStateDescriptor(Metrics metric, Indices index): base(r => r.Optional("metric", metric).Optional("index", index))
{
}
// values part of the url path
Metrics IClusterStateRequest.Metric => Self.RouteValues.Get("metric");
Indices IClusterStateRequest.Index => Self.RouteValues.Get("index");
///Limit the information returned to the specified metrics
public ClusterStateDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v));
///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices
public ClusterStateDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///a shortcut into calling Index(typeof(TOther))
public ClusterStateDescriptor Index()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///A shortcut into calling Index(Indices.All)
public ClusterStateDescriptor 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 ClusterStateDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///Whether to expand wildcard expression to concrete indices that are open, closed or both.
public ClusterStateDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///Return settings in flat format (default: false)
public ClusterStateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///Whether specified concrete indices should be ignored when unavailable (missing or closed)
public ClusterStateDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///Return local information, do not retrieve the state from cluster_manager node (default: false)
public ClusterStateDescriptor Local(bool? local = true) => Qs("local", local);
///Explicit operation timeout for connection to master node
///Deprecated as of OpenSearch 2.0, use instead
public ClusterStateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///Explicit operation timeout for connection to cluster_manager node
///Introduced in OpenSearch 2.0 instead of
public ClusterStateDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///Wait for the metadata version to be equal or greater than the specified metadata version
public ClusterStateDescriptor WaitForMetadataVersion(long? waitformetadataversion) => Qs("wait_for_metadata_version", waitformetadataversion);
///The maximum time to wait for wait_for_metadata_version before timing out
public ClusterStateDescriptor WaitForTimeout(Time waitfortimeout) => Qs("wait_for_timeout", waitfortimeout);
}
///Descriptor for Stats
public partial class ClusterStatsDescriptor : RequestDescriptorBase, IClusterStatsRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterStats;
////_cluster/stats
public ClusterStatsDescriptor(): base()
{
}
////_cluster/stats/nodes/{node_id}
///Optional, accepts null
public ClusterStatsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
{
}
// values part of the url path
NodeIds IClusterStatsRequest.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 ClusterStatsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
// Request parameters
///Return settings in flat format (default: false)
public ClusterStatsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///Explicit operation timeout
public ClusterStatsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
}