Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-generated client code using latest OpenSearch API specification #839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,011 changes: 2,087 additions & 924 deletions src/ApiGenerator/opensearch-openapi.yaml

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions src/OpenSearch.Client/_Generated/Descriptors.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,27 @@ public CatAliasesDescriptor Name(Names name) =>
Assign(name, (a, v) => a.RouteValues.Optional("name", v));

// Request parameters
/// <summary>Whether to expand wildcard expression to concrete indexes that are open, closed or both.</summary>
/// <summary>Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`.</summary>
public CatAliasesDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) =>
Qs("expand_wildcards", expandwildcards);

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the `Accept` header, such as `json` or `yaml`.</summary>
public CatAliasesDescriptor Format(string format) => Qs("format", format);

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public CatAliasesDescriptor Headers(params string[] headers) => Qs("h", headers);

/// <summary>Return help information.</summary>
/// <summary>Returns help information.</summary>
public CatAliasesDescriptor Help(bool? help = true) => Qs("help", help);

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
/// <summary>Whether to return information from the local node only instead of from the cluster manager node.</summary>
public CatAliasesDescriptor Local(bool? local = true) => Qs("local", local);

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public CatAliasesDescriptor SortByColumns(params string[] sortbycolumns) =>
Qs("s", sortbycolumns);

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public CatAliasesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}

Expand Down Expand Up @@ -165,43 +165,43 @@ public CatAllocationDescriptor(NodeIds nodeId)
// values part of the url path
NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");

/// <summary>Comma-separated list of node identifiers or names used to limit the returned information.</summary>
/// <summary>A comma-separated list of node IDs or names used to limit the returned information.</summary>
public CatAllocationDescriptor NodeId(NodeIds nodeId) =>
Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));

// Request parameters
/// <summary>The unit used to display byte values.</summary>
/// <summary>The units used to display byte values.</summary>
public CatAllocationDescriptor Bytes(ByteUnit? bytes) => Qs("bytes", bytes);

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public CatAllocationDescriptor ClusterManagerTimeout(Time clustermanagertimeout) =>
Qs("cluster_manager_timeout", clustermanagertimeout);

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the HTTP `Accept` header, such as `json` or `yaml`.</summary>
public CatAllocationDescriptor Format(string format) => Qs("format", format);

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public CatAllocationDescriptor Headers(params string[] headers) => Qs("h", headers);

/// <summary>Return help information.</summary>
/// <summary>Returns help information.</summary>
public CatAllocationDescriptor Help(bool? help = true) => Qs("help", help);

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
/// <summary>Returns local information but does not retrieve the state from cluster-manager node.</summary>
public CatAllocationDescriptor Local(bool? local = true) => Qs("local", local);

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use `cluster_manager_timeout` instead."
)]
public CatAllocationDescriptor MasterTimeout(Time mastertimeout) =>
Qs("master_timeout", mastertimeout);

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public CatAllocationDescriptor SortByColumns(params string[] sortbycolumns) =>
Qs("s", sortbycolumns);

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public CatAllocationDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}

Expand All @@ -218,15 +218,15 @@ public partial class CatClusterManagerDescriptor

// values part of the url path
// Request parameters
/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public CatClusterManagerDescriptor ClusterManagerTimeout(Time clustermanagertimeout) =>
Qs("cluster_manager_timeout", clustermanagertimeout);

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the HTTP `Accept` header, such as `json` or `yaml`.</summary>
public CatClusterManagerDescriptor Format(string format) => Qs("format", format);

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public CatClusterManagerDescriptor Headers(params string[] headers) => Qs("h", headers);

/// <summary>Return help information.</summary>
Expand All @@ -235,18 +235,18 @@ public CatClusterManagerDescriptor ClusterManagerTimeout(Time clustermanagertime
/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
public CatClusterManagerDescriptor Local(bool? local = true) => Qs("local", local);

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use `cluster_manager_timeout` instead."
)]
public CatClusterManagerDescriptor MasterTimeout(Time mastertimeout) =>
Qs("master_timeout", mastertimeout);

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public CatClusterManagerDescriptor SortByColumns(params string[] sortbycolumns) =>
Qs("s", sortbycolumns);

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public CatClusterManagerDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}

Expand Down
47 changes: 25 additions & 22 deletions src/OpenSearch.Client/_Generated/Requests.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@ public CatAliasesRequest(Names name)
Names ICatAliasesRequest.Name => Self.RouteValues.Get<Names>("name");

// Request parameters
/// <summary>Whether to expand wildcard expression to concrete indexes that are open, closed or both.</summary>
/// <summary>
/// Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`,
/// `hidden`, and `none`.
/// </summary>
public ExpandWildcards? ExpandWildcards
{
get => Q<ExpandWildcards?>("expand_wildcards");
set => Q("expand_wildcards", value);
}

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the `Accept` header, such as `json` or `yaml`.</summary>
public string Format
{
get => Q<string>("format");
Expand All @@ -105,35 +108,35 @@ public string Format
}
}

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public string[] Headers
{
get => Q<string[]>("h");
set => Q("h", value);
}

/// <summary>Return help information.</summary>
/// <summary>Returns help information.</summary>
public bool? Help
{
get => Q<bool?>("help");
set => Q("help", value);
}

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
/// <summary>Whether to return information from the local node only instead of from the cluster manager node.</summary>
public bool? Local
{
get => Q<bool?>("local");
set => Q("local", value);
}

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public string[] SortByColumns
{
get => Q<string[]>("s");
set => Q("s", value);
}

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public bool? Verbose
{
get => Q<bool?>("v");
Expand Down Expand Up @@ -232,22 +235,22 @@ public CatAllocationRequest(NodeIds nodeId)
NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");

// Request parameters
/// <summary>The unit used to display byte values.</summary>
/// <summary>The units used to display byte values.</summary>
public ByteUnit? Bytes
{
get => Q<ByteUnit?>("bytes");
set => Q("bytes", value);
}

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public Time ClusterManagerTimeout
{
get => Q<Time>("cluster_manager_timeout");
set => Q("cluster_manager_timeout", value);
}

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the HTTP `Accept` header, such as `json` or `yaml`.</summary>
public string Format
{
get => Q<string>("format");
Expand All @@ -258,28 +261,28 @@ public string Format
}
}

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public string[] Headers
{
get => Q<string[]>("h");
set => Q("h", value);
}

/// <summary>Return help information.</summary>
/// <summary>Returns help information.</summary>
public bool? Help
{
get => Q<bool?>("help");
set => Q("help", value);
}

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
/// <summary>Returns local information but does not retrieve the state from cluster-manager node.</summary>
public bool? Local
{
get => Q<bool?>("local");
set => Q("local", value);
}

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use `cluster_manager_timeout` instead."
)]
Expand All @@ -289,14 +292,14 @@ public Time MasterTimeout
set => Q("master_timeout", value);
}

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public string[] SortByColumns
{
get => Q<string[]>("s");
set => Q("s", value);
}

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public bool? Verbose
{
get => Q<bool?>("v");
Expand All @@ -319,15 +322,15 @@ public partial class CatClusterManagerRequest
// values part of the url path

// Request parameters
/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public Time ClusterManagerTimeout
{
get => Q<Time>("cluster_manager_timeout");
set => Q("cluster_manager_timeout", value);
}

/// <summary>A short version of the Accept header (for example, `json`, `yaml`).</summary>
/// <summary>A short version of the HTTP `Accept` header, such as `json` or `yaml`.</summary>
public string Format
{
get => Q<string>("format");
Expand All @@ -338,7 +341,7 @@ public string Format
}
}

/// <summary>Comma-separated list of column names to display.</summary>
/// <summary>A comma-separated list of column names to display.</summary>
public string[] Headers
{
get => Q<string[]>("h");
Expand All @@ -359,7 +362,7 @@ public bool? Local
set => Q("local", value);
}

/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <summary>A timeout for connection to the cluster manager node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use `cluster_manager_timeout` instead."
)]
Expand All @@ -369,14 +372,14 @@ public Time MasterTimeout
set => Q("master_timeout", value);
}

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
/// <summary>A comma-separated list of column names or column aliases to sort by.</summary>
public string[] SortByColumns
{
get => Q<string[]>("s");
set => Q("s", value);
}

/// <summary>Verbose mode. Display column headers.</summary>
/// <summary>Enables verbose mode, which displays column headers.</summary>
public bool? Verbose
{
get => Q<bool?>("v");
Expand Down
Loading
Loading