From 6e4163b3a2aa724b6663199707674f806a4f27d6 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Mon, 23 Sep 2024 11:51:30 +1200 Subject: [PATCH 1/2] Generate all missing low-level methods Signed-off-by: Thomas Farr --- .../Configuration/CodeConfiguration.cs | 11 +- src/ApiGenerator/Domain/Code/CsharpNames.cs | 5 +- .../Generator/ApiEndpointFactory.cs | 29 +- .../Requests/PlainRequestBase.cshtml | 18 +- src/OpenSearch.Client/_Generated/Requests.cs | 26 +- src/OpenSearch.Net/_Generated/Api/Enums.cs | 116 + .../RequestParameters.AsynchronousSearch.cs | 110 + .../RequestParameters.FlowFramework.cs | 206 ++ .../RequestParameters.Ism.cs | 208 ++ .../RequestParameters.Knn.cs | 421 +++ .../RequestParameters/RequestParameters.Ml.cs | 133 + .../RequestParameters.Notifications.cs | 330 +++ .../RequestParameters.Observability.cs | 123 + .../RequestParameters.Ppl.cs | 138 + .../RequestParameters.Query.cs | 94 + .../RequestParameters.RemoteStore.cs | 76 + .../RequestParameters.Rollups.cs | 110 + .../RequestParameters.SearchPipeline.cs | 113 + .../RequestParameters.Security.cs | 736 +++++ .../RequestParameters.Sql.cs | 173 ++ .../RequestParameters.Transforms.cs | 145 + .../_Generated/IOpenSearchLowLevelClient.cs | 60 + ...SearchLowLevelClient.AsynchronousSearch.cs | 195 ++ .../OpenSearchLowLevelClient.FlowFramework.cs | 424 +++ .../OpenSearchLowLevelClient.Ism.cs | 640 +++++ .../OpenSearchLowLevelClient.Knn.cs | 404 +++ .../_Generated/OpenSearchLowLevelClient.Ml.cs | 402 +++ .../OpenSearchLowLevelClient.Notifications.cs | 381 +++ .../OpenSearchLowLevelClient.Observability.cs | 309 ++ .../OpenSearchLowLevelClient.Ppl.cs | 193 ++ .../OpenSearchLowLevelClient.Query.cs | 243 ++ .../OpenSearchLowLevelClient.RemoteStore.cs | 105 + .../OpenSearchLowLevelClient.Rollups.cs | 268 ++ ...OpenSearchLowLevelClient.SearchPipeline.cs | 202 ++ .../OpenSearchLowLevelClient.Security.cs | 2555 +++++++++++++++++ .../OpenSearchLowLevelClient.Sql.cs | 259 ++ .../OpenSearchLowLevelClient.Transforms.cs | 328 +++ .../_Generated/OpenSearchLowLevelClient.cs | 45 + tests/Tests.YamlRunner/SkipList.fs | 13 - 39 files changed, 10279 insertions(+), 68 deletions(-) create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.FlowFramework.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ism.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Knn.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ml.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Notifications.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Observability.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ppl.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Query.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.RemoteStore.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Rollups.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.SearchPipeline.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Security.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Sql.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Transforms.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.AsynchronousSearch.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.FlowFramework.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ism.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Knn.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ml.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Notifications.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Observability.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ppl.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Query.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.RemoteStore.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Rollups.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.SearchPipeline.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Security.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Sql.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Transforms.cs diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index 98d1bed0ad..fbb4a4a4ac 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -39,17 +39,10 @@ public static class CodeConfiguration { private static readonly Glob[] OperationsToInclude = [ - new("cat.*"), - new("cluster.*"), - new("dangling_indices.*"), - new("indices.*"), - new("ingest.*"), - new("nodes.*"), - new("snapshot.*"), - new("tasks.*") + new("*") ]; - public static bool IncludeOperation(string name) => !name.Contains('.') || OperationsToInclude.Any(g => g.IsMatch(name)); + public static bool IncludeOperation(string name) => OperationsToInclude.Any(g => g.IsMatch(name)); /// /// Map API default names for API's we are only supporting on the low level client first diff --git a/src/ApiGenerator/Domain/Code/CsharpNames.cs b/src/ApiGenerator/Domain/Code/CsharpNames.cs index ea9b23d2ea..a100d0e54e 100644 --- a/src/ApiGenerator/Domain/Code/CsharpNames.cs +++ b/src/ApiGenerator/Domain/Code/CsharpNames.cs @@ -123,7 +123,7 @@ public string PerPathMethodName(string path) var method = MethodName; // This is temporary for transition period // TODO: remove in branch once it in opensearch is scrubbed - if (path.Contains("{type}") && !method.Contains("Type")) method += "UsingType"; + if (pc("{type}") && !method.Contains("Type")) method += "UsingType"; if (ms("Indices") && !pc("{index}")) return (method + "ForAll").Replace("AsyncForAll", "ForAllAsync"); @@ -131,6 +131,9 @@ public string PerPathMethodName(string path) if (ms("Nodes") && !pc("{node_id}")) return (method + "ForAll").Replace("AsyncForAll", "ForAllAsync"); + if (Namespace == "Knn" && method.StartsWith("Stats") && !pc("{node_id}")) + return method.Replace("Stats", "StatsForAll"); + return method; } diff --git a/src/ApiGenerator/Generator/ApiEndpointFactory.cs b/src/ApiGenerator/Generator/ApiEndpointFactory.cs index dc728188d0..22d6aaf551 100644 --- a/src/ApiGenerator/Generator/ApiEndpointFactory.cs +++ b/src/ApiGenerator/Generator/ApiEndpointFactory.cs @@ -238,14 +238,17 @@ private static string GetOpenSearchType(JsonSchema schema, Action if (first.EndsWith("?")) return first; if (first == second) return first; - switch (first, second) + return (first, second) switch { - case ("string", "list"): return second; - case ("boolean", "string"): return first; - case ("number", _): return "string"; - case (_,"number"): return "string"; - } + (_, "list") => second, + ("boolean", "string") => first, + ("number", _) => "string", + (_, "number") => "string", + (_, _) => throw new Exception($"Unable to determine type of: {first} and {second}") + }; } + + throw new Exception("Unable to determine type of oneOf"); } var enumOptions = schema.Enumeration.Where(e => e != null).Select(e => e.ToString()).ToList(); @@ -259,7 +262,19 @@ private static string GetOpenSearchType(JsonSchema schema, Action if (schema.Type == JsonObjectType.Array && (schema.Item?.HasReference ?? false)) _ = GetOpenSearchType(schema.Item, trackEnumToGenerate, true); - return schema.Type switch + var types = Enum.GetValues() + .Where(t => t != JsonObjectType.None && schema.Type.HasFlag(t)) + .ToHashSet(); + + var type = types.Count switch + { + 0 => throw new Exception("No type specified"), + 1 => types.First(), + 2 when types.Contains(JsonObjectType.Boolean) && types.Contains(JsonObjectType.String) => JsonObjectType.String, + _ => throw new Exception($"Unable to determine type of: {string.Join(", ", types)}") + }; + + return type switch { JsonObjectType.Integer => "number", JsonObjectType.Array => "list", diff --git a/src/ApiGenerator/Views/HighLevel/Requests/PlainRequestBase.cshtml b/src/ApiGenerator/Views/HighLevel/Requests/PlainRequestBase.cshtml index 8a0fbafbc6..a78cb750ab 100644 --- a/src/ApiGenerator/Views/HighLevel/Requests/PlainRequestBase.cshtml +++ b/src/ApiGenerator/Views/HighLevel/Requests/PlainRequestBase.cshtml @@ -1,21 +1,9 @@ @using ApiGenerator.Domain @inherits ApiGenerator.CodeTemplatePage @{ await IncludeLegacyGeneratorNotice(); } -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; -using System.Runtime.Serialization; -using OpenSearch.Net; -using OpenSearch.Net.Utf8Json; -@{ await IncludeAsync("LowLevel/Client/Usings.cshtml", Model);} -// ReSharper disable UnusedTypeParameter -namespace OpenSearch.Client +namespace OpenSearch.Client; + +public abstract partial class @Raw("PlainRequestBase") { - public abstract partial class @Raw("PlainRequestBase") - { - } } diff --git a/src/OpenSearch.Client/_Generated/Requests.cs b/src/OpenSearch.Client/_Generated/Requests.cs index 64af2783e3..f15144a167 100644 --- a/src/OpenSearch.Client/_Generated/Requests.cs +++ b/src/OpenSearch.Client/_Generated/Requests.cs @@ -41,27 +41,7 @@ // Windows : build.bat codegen // // ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Runtime.Serialization; -using System.Text; -using OpenSearch.Net; -using OpenSearch.Net.Specification.CatApi; -using OpenSearch.Net.Specification.ClusterApi; -using OpenSearch.Net.Specification.DanglingIndicesApi; -using OpenSearch.Net.Specification.HttpApi; -using OpenSearch.Net.Specification.IndicesApi; -using OpenSearch.Net.Specification.IngestApi; -using OpenSearch.Net.Specification.NodesApi; -using OpenSearch.Net.Specification.SnapshotApi; -using OpenSearch.Net.Specification.TasksApi; -using OpenSearch.Net.Utf8Json; -// ReSharper disable UnusedTypeParameter -namespace OpenSearch.Client -{ - public abstract partial class PlainRequestBase { } -} +namespace OpenSearch.Client; + +public abstract partial class PlainRequestBase { } diff --git a/src/OpenSearch.Net/_Generated/Api/Enums.cs b/src/OpenSearch.Net/_Generated/Api/Enums.cs index 819c0c4e07..ef2a97712a 100644 --- a/src/OpenSearch.Net/_Generated/Api/Enums.cs +++ b/src/OpenSearch.Net/_Generated/Api/Enums.cs @@ -309,6 +309,39 @@ public enum IndicesStatsMetric All = 1 << 17, } + [StringEnum] + public enum KnnDefaultOperator + { + [EnumMember(Value = "AND")] + And, + + [EnumMember(Value = "OR")] + Or, + } + + [StringEnum] + public enum KnnSearchType + { + [EnumMember(Value = "dfs_query_then_fetch")] + DfsQueryThenFetch, + + [EnumMember(Value = "query_then_fetch")] + QueryThenFetch, + } + + [StringEnum] + public enum KnnSuggestMode + { + [EnumMember(Value = "always")] + Always, + + [EnumMember(Value = "missing")] + Missing, + + [EnumMember(Value = "popular")] + Popular, + } + [StringEnum] public enum Level { @@ -534,6 +567,37 @@ public enum NodesUsageMetric All = 1 << 1, } + [StringEnum] + public enum NotificationsNotificationConfigType + { + [EnumMember(Value = "chime")] + Chime, + + [EnumMember(Value = "email")] + Email, + + [EnumMember(Value = "email_group")] + EmailGroup, + + [EnumMember(Value = "microsoft_teams")] + MicrosoftTeams, + + [EnumMember(Value = "ses_account")] + SesAccount, + + [EnumMember(Value = "slack")] + Slack, + + [EnumMember(Value = "smtp_account")] + SmtpAccount, + + [EnumMember(Value = "sns")] + Sns, + + [EnumMember(Value = "webhook")] + Webhook, + } + [StringEnum] public enum OpType { @@ -688,12 +752,16 @@ static partial void RegisterEnumStringResolvers() AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); + AddEnumStringResolver(GetStringValue); + AddEnumStringResolver(GetStringValue); + AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); + AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); AddEnumStringResolver(GetStringValue); @@ -900,6 +968,37 @@ public static string GetStringValue(this IndicesStatsMetric enumValue) return string.Join(",", list); } + public static string GetStringValue(this KnnDefaultOperator enumValue) => + enumValue switch + { + KnnDefaultOperator.And => "AND", + KnnDefaultOperator.Or => "OR", + _ => throw new ArgumentException( + $"'{enumValue.ToString()}' is not a valid value for enum 'KnnDefaultOperator'" + ), + }; + + public static string GetStringValue(this KnnSearchType enumValue) => + enumValue switch + { + KnnSearchType.DfsQueryThenFetch => "dfs_query_then_fetch", + KnnSearchType.QueryThenFetch => "query_then_fetch", + _ => throw new ArgumentException( + $"'{enumValue.ToString()}' is not a valid value for enum 'KnnSearchType'" + ), + }; + + public static string GetStringValue(this KnnSuggestMode enumValue) => + enumValue switch + { + KnnSuggestMode.Always => "always", + KnnSuggestMode.Missing => "missing", + KnnSuggestMode.Popular => "popular", + _ => throw new ArgumentException( + $"'{enumValue.ToString()}' is not a valid value for enum 'KnnSuggestMode'" + ), + }; + public static string GetStringValue(this Level enumValue) => enumValue switch { @@ -1068,6 +1167,23 @@ public static string GetStringValue(this NodesUsageMetric enumValue) return string.Join(",", list); } + public static string GetStringValue(this NotificationsNotificationConfigType enumValue) => + enumValue switch + { + NotificationsNotificationConfigType.Chime => "chime", + NotificationsNotificationConfigType.Email => "email", + NotificationsNotificationConfigType.EmailGroup => "email_group", + NotificationsNotificationConfigType.MicrosoftTeams => "microsoft_teams", + NotificationsNotificationConfigType.SesAccount => "ses_account", + NotificationsNotificationConfigType.Slack => "slack", + NotificationsNotificationConfigType.SmtpAccount => "smtp_account", + NotificationsNotificationConfigType.Sns => "sns", + NotificationsNotificationConfigType.Webhook => "webhook", + _ => throw new ArgumentException( + $"'{enumValue.ToString()}' is not a valid value for enum 'NotificationsNotificationConfigType'" + ), + }; + public static string GetStringValue(this OpType enumValue) => enumValue switch { diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs new file mode 100644 index 0000000000..c65f57f287 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs @@ -0,0 +1,110 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.AsynchronousSearchApi +{ + /// Request options for Delete https://opensearch.org/docs/latest/search-plugins/async/index/#delete-searches-and-results + public partial class DeleteRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for Get https://opensearch.org/docs/latest/search-plugins/async/index/#get-partial-results + public partial class GetRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Search https://opensearch.org/docs/latest/search-plugins/async/index/#rest-api + public partial class SearchRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// The name of the index to be searched. + public string Index + { + get => Q("index"); + set => Q("index", value); + } + + /// The amount of time that the result is saved in the cluster. + public string KeepAlive + { + get => Q("keep_alive"); + set => Q("keep_alive", value); + } + + /// Whether you want to save the results in the cluster after the search is complete. + public bool? KeepOnCompletion + { + get => Q("keep_on_completion"); + set => Q("keep_on_completion", value); + } + + /// The amount of time that you plan to wait for the results. + public string WaitForCompletionTimeout + { + get => Q("wait_for_completion_timeout"); + set => Q("wait_for_completion_timeout", value); + } + } + + /// Request options for Stats https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats + public partial class StatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.FlowFramework.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.FlowFramework.cs new file mode 100644 index 0000000000..62bd6aba71 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.FlowFramework.cs @@ -0,0 +1,206 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.FlowFrameworkApi +{ + /// Request options for Create https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + public partial class CreateRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + public bool? Provision + { + get => Q("provision"); + set => Q("provision", value); + } + + /// Supported by OpenSearch servers of version 2.17.0 or greater. + public bool? Reprovision + { + get => Q("reprovision"); + set => Q("reprovision", value); + } + public bool? UpdateFields + { + get => Q("update_fields"); + set => Q("update_fields", value); + } + + /// To use a workflow template, specify it in the use_case query parameter when creating a workflow. + public string UseCase + { + get => Q("use_case"); + set => Q("use_case", value); + } + public string Validation + { + get => Q("validation"); + set => Q("validation", value); + } + } + + /// Request options for Delete https://opensearch.org/docs/latest/automating-configurations/api/delete-workflow/ + public partial class DeleteRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + public bool? ClearStatus + { + get => Q("clear_status"); + set => Q("clear_status", value); + } + } + + /// Request options for Deprovision https://opensearch.org/docs/latest/automating-configurations/api/deprovision-workflow/ + public partial class DeprovisionRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + public string AllowDelete + { + get => Q("allow_delete"); + set => Q("allow_delete", value); + } + } + + /// Request options for Get https://opensearch.org/docs/latest/automating-configurations/api/get-workflow/ + public partial class GetRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetStatus https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-status/ + public partial class GetStatusRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// The all parameter specifies whether the response should return all fields. + public bool? All + { + get => Q("all"); + set => Q("all", value); + } + } + + /// Request options for GetSteps https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-steps/ + public partial class GetStepsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + public string WorkflowStep + { + get => Q("workflow_step"); + set => Q("workflow_step", value); + } + } + + /// Request options for Provision https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + public partial class ProvisionRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for Search https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + public partial class SearchRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for SearchState https://opensearch.org/docs/latest/automating-configurations/api/search-workflow-state/ + public partial class SearchStateRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for Update https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + public partial class UpdateRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + public bool? Provision + { + get => Q("provision"); + set => Q("provision", value); + } + + /// Supported by OpenSearch servers of version 2.17.0 or greater. + public bool? Reprovision + { + get => Q("reprovision"); + set => Q("reprovision", value); + } + public bool? UpdateFields + { + get => Q("update_fields"); + set => Q("update_fields", value); + } + + /// To use a workflow template, specify it in the use_case query parameter when creating a workflow. + public string UseCase + { + get => Q("use_case"); + set => Q("use_case", value); + } + public string Validation + { + get => Q("validation"); + set => Q("validation", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ism.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ism.cs new file mode 100644 index 0000000000..b579e87b40 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ism.cs @@ -0,0 +1,208 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.IsmApi +{ + /// Request options for AddPolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + public partial class AddPolicyRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + public string Index + { + get => Q("index"); + set => Q("index", value); + } + } + + /// Request options for ChangePolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + public partial class ChangePolicyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + public string Index + { + get => Q("index"); + set => Q("index", value); + } + } + + /// Request options for DeletePolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy + public partial class DeletePolicyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for ExistsPolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + public partial class ExistsPolicyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; + public override bool SupportsBody => false; + } + + /// Request options for ExplainPolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + public partial class ExplainPolicyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for GetPolicies https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + public partial class GetPoliciesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetPolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#put-policy + public partial class GetPolicyRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for PutPolicies https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + public partial class PutPoliciesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// Only perform the operation if the document has this primary term. + public long? IfPrimaryTerm + { + get => Q("if_primary_term"); + set => Q("if_primary_term", value); + } + + /// Only perform the operation if the document has this sequence number. + public long? IfSequenceNumber + { + get => Q("if_seq_no"); + set => Q("if_seq_no", value); + } + public string Policyid + { + get => Q("policyID"); + set => Q("policyID", value); + } + } + + /// Request options for PutPolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + public partial class PutPolicyRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// Only perform the operation if the document has this primary term. + public long? IfPrimaryTerm + { + get => Q("if_primary_term"); + set => Q("if_primary_term", value); + } + + /// Only perform the operation if the document has this sequence number. + public long? IfSequenceNumber + { + get => Q("if_seq_no"); + set => Q("if_seq_no", value); + } + } + + /// Request options for RefreshSearchAnalyzers https://opensearch.org/docs/latest/im-plugin/refresh-analyzer/ + public partial class RefreshSearchAnalyzersRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for RemovePolicy https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + public partial class RemovePolicyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + public string Index + { + get => Q("index"); + set => Q("index", value); + } + } + + /// Request options for RetryIndex https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + public partial class RetryIndexRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + public string Index + { + get => Q("index"); + set => Q("index", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Knn.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Knn.cs new file mode 100644 index 0000000000..c9cf971a16 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Knn.cs @@ -0,0 +1,421 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.KnnApi +{ + /// Request options for DeleteModel https://opensearch.org/docs/latest/search-plugins/knn/api/#delete-model + public partial class DeleteModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for GetModel https://opensearch.org/docs/latest/search-plugins/knn/api/#get-model + public partial class GetModelRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for SearchModels https://opensearch.org/docs/latest/search-plugins/knn/api/#search-model + public partial class SearchModelsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// + /// 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 bool? AllowNoIndices + { + get => Q("allow_no_indices"); + set => Q("allow_no_indices", value); + } + + /// Indicate if an error should be returned if there is a partial search failure or timeout. + public bool? AllowPartialSearchResults + { + get => Q("allow_partial_search_results"); + set => Q("allow_partial_search_results", value); + } + + /// The analyzer to use for the query string. + public string Analyzer + { + get => Q("analyzer"); + set => Q("analyzer", value); + } + + /// Specify whether wildcard and prefix queries should be analyzed. + public bool? AnalyzeWildcard + { + get => Q("analyze_wildcard"); + set => Q("analyze_wildcard", value); + } + + /// + /// The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism + /// to reduce the memory overhead per search request if the potential number of shards in the request can be large. + /// + public long? BatchedReduceSize + { + get => Q("batched_reduce_size"); + set => Q("batched_reduce_size", value); + } + + /// Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. + public bool? CcsMinimizeRoundtrips + { + get => Q("ccs_minimize_roundtrips"); + set => Q("ccs_minimize_roundtrips", value); + } + + /// The default operator for query string query (AND or OR). + public KnnDefaultOperator? DefaultOperator + { + get => Q("default_operator"); + set => Q("default_operator", value); + } + + /// The field to use as default where no field prefix is given in the query string. + public string Df + { + get => Q("df"); + set => Q("df", value); + } + + /// Comma-separated list of fields to return as the docvalue representation of a field for each hit. + public string[] DocValueFields + { + get => Q("docvalue_fields"); + set => Q("docvalue_fields", value); + } + + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + public ExpandWildcards? ExpandWildcards + { + get => Q("expand_wildcards"); + set => Q("expand_wildcards", value); + } + + /// Specify whether to return detailed information about score computation as part of a hit. + public bool? Explain + { + get => Q("explain"); + set => Q("explain", value); + } + + /// Starting offset. + public long? From + { + get => Q("from"); + set => Q("from", value); + } + + /// Whether specified concrete, expanded or aliased indices should be ignored when throttled. + public bool? IgnoreThrottled + { + get => Q("ignore_throttled"); + set => Q("ignore_throttled", value); + } + + /// Whether specified concrete indices should be ignored when unavailable (missing or closed). + public bool? IgnoreUnavailable + { + get => Q("ignore_unavailable"); + set => Q("ignore_unavailable", value); + } + + /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored. + public bool? Lenient + { + get => Q("lenient"); + set => Q("lenient", value); + } + + /// + /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the + /// search on the cluster in order to limit the number of concurrent shard requests. + /// + public long? MaxConcurrentShardRequests + { + get => Q("max_concurrent_shard_requests"); + set => Q("max_concurrent_shard_requests", value); + } + + /// Specify the node or shard the operation should be performed on. + public string Preference + { + get => Q("preference"); + set => Q("preference", value); + } + + /// + /// Threshold that enforces a pre-filter round-trip to prefilter search shards based on query rewriting if the number of shards the search + /// request expands to exceeds the threshold. This filter round-trip can limit the number of shards significantly if for instance a shard can + /// not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are + /// disjoint. + /// + public long? PreFilterShardSize + { + get => Q("pre_filter_shard_size"); + set => Q("pre_filter_shard_size", value); + } + + /// Query in the Lucene query string syntax. + public string QueryOnQueryString + { + get => Q("q"); + set => Q("q", value); + } + + /// Specify if request cache should be used for this request or not, defaults to index level setting. + public bool? RequestCache + { + get => Q("request_cache"); + set => Q("request_cache", value); + } + + /// Comma-separated list of specific routing values. + public string[] Routing + { + get => Q("routing"); + set => Q("routing", value); + } + + /// Specify how long a consistent view of the index should be maintained for scrolled search. + public TimeSpan Scroll + { + get => Q("scroll"); + set => Q("scroll", value); + } + + /// Search operation type. + public KnnSearchType? SearchType + { + get => Q("search_type"); + set => Q("search_type", value); + } + + /// Specify whether to return sequence number and primary term of the last modification of each hit. + public bool? SequenceNumberPrimaryTerm + { + get => Q("seq_no_primary_term"); + set => Q("seq_no_primary_term", value); + } + + /// Number of hits to return. + public long? Size + { + get => Q("size"); + set => Q("size", value); + } + + /// Comma-separated list of <field>:<direction> pairs. + public string[] Sort + { + get => Q("sort"); + set => Q("sort", value); + } + + /// True or false to return the _source field or not, or a list of fields to return. + public bool? SourceEnabled + { + get => Q("_source"); + set => Q("_source", value); + } + + /// List of fields to exclude from the returned _source field. + public string[] SourceExcludes + { + get => Q("_source_excludes"); + set => Q("_source_excludes", value); + } + + /// List of fields to extract and return from the _source field. + public string[] SourceIncludes + { + get => Q("_source_includes"); + set => Q("_source_includes", value); + } + + /// Specific 'tag' of the request for logging and statistical purposes. + public string[] Stats + { + get => Q("stats"); + set => Q("stats", value); + } + + /// Comma-separated list of stored fields to return. + public string[] StoredFields + { + get => Q("stored_fields"); + set => Q("stored_fields", value); + } + + /// Specify which field to use for suggestions. + public string SuggestField + { + get => Q("suggest_field"); + set => Q("suggest_field", value); + } + + /// Specify suggest mode. + public KnnSuggestMode? SuggestMode + { + get => Q("suggest_mode"); + set => Q("suggest_mode", value); + } + + /// How many suggestions to return in response. + public long? SuggestSize + { + get => Q("suggest_size"); + set => Q("suggest_size", value); + } + + /// The source text for which the suggestions should be returned. + public string SuggestText + { + get => Q("suggest_text"); + set => Q("suggest_text", value); + } + + /// The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + public long? TerminateAfter + { + get => Q("terminate_after"); + set => Q("terminate_after", value); + } + + /// Operation timeout. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + + /// Indicates whether hits.total should be rendered as an integer or an object in the rest search response. + public bool? TotalHitsAsInteger + { + get => Q("rest_total_hits_as_int"); + set => Q("rest_total_hits_as_int", value); + } + + /// Whether to calculate and return scores even if they are not used for sorting. + public bool? TrackScores + { + get => Q("track_scores"); + set => Q("track_scores", value); + } + + /// Indicate if the number of documents that match the query should be tracked. + public bool? TrackTotalHits + { + get => Q("track_total_hits"); + set => Q("track_total_hits", value); + } + + /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response. + public bool? TypedKeys + { + get => Q("typed_keys"); + set => Q("typed_keys", value); + } + + /// Whether to return document version as part of a hit. + public bool? Version + { + get => Q("version"); + set => Q("version", value); + } + } + + /// Request options for Stats https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + public partial class StatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// Operation timeout. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + } + + /// Request options for TrainModel https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model + public partial class TrainModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// Preferred node to execute training. + public string Preference + { + get => Q("preference"); + set => Q("preference", value); + } + } + + /// Request options for Warmup https://opensearch.org/docs/latest/search-plugins/knn/api/#warmup-operation + public partial class WarmupRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ml.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ml.cs new file mode 100644 index 0000000000..3ab95114d4 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ml.cs @@ -0,0 +1,133 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.MlApi +{ + /// Request options for DeleteModel + public partial class DeleteModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteModelGroup + public partial class DeleteModelGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteTask + public partial class DeleteTaskRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeployModel + public partial class DeployModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for GetModelGroup + public partial class GetModelGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetTask + public partial class GetTaskRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for RegisterModel + public partial class RegisterModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for RegisterModelGroup + public partial class RegisterModelGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for SearchModels + public partial class SearchModelsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => true; + } + + /// Request options for UndeployModel + public partial class UndeployModelRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Notifications.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Notifications.cs new file mode 100644 index 0000000000..4632e9310d --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Notifications.cs @@ -0,0 +1,330 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.NotificationsApi +{ + /// Request options for CreateConfig https://opensearch.org/docs/latest/observing-your-data/notifications/api/#create-channel-configuration + public partial class CreateConfigRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for DeleteConfig https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + public partial class DeleteConfigRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteConfigs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + public partial class DeleteConfigsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + + /// The ID of the channel configuration to delete. + public string ConfigId + { + get => Q("config_id"); + set => Q("config_id", value); + } + + /// A comma-separated list of channel IDs to delete. + public string ConfigIdList + { + get => Q("config_id_list"); + set => Q("config_id_list", value); + } + } + + /// Request options for GetConfig + public partial class GetConfigRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetConfigs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-configurations + public partial class GetConfigsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => true; + public string ChimeUrl + { + get => Q("chime.url"); + set => Q("chime.url", value); + } + public string ChimeUrlKeyword + { + get => Q("chime.url.keyword"); + set => Q("chime.url.keyword", value); + } + + /// Type of notification configuration. + public NotificationsNotificationConfigType? ConfigType + { + get => Q("config_type"); + set => Q("config_type", value); + } + public long? CreatedTimeMs + { + get => Q("created_time_ms"); + set => Q("created_time_ms", value); + } + public string Description + { + get => Q("description"); + set => Q("description", value); + } + public string DescriptionKeyword + { + get => Q("description.keyword"); + set => Q("description.keyword", value); + } + public string EmailEmailAccountId + { + get => Q("email.email_account_id"); + set => Q("email.email_account_id", value); + } + public string EmailEmailGroupIdList + { + get => Q("email.email_group_id_list"); + set => Q("email.email_group_id_list", value); + } + public string EmailGroupRecipientListRecipient + { + get => Q("email_group.recipient_list.recipient"); + set => Q("email_group.recipient_list.recipient", value); + } + public string EmailGroupRecipientListRecipientKeyword + { + get => Q("email_group.recipient_list.recipient.keyword"); + set => Q("email_group.recipient_list.recipient.keyword", value); + } + public string EmailRecipientListRecipient + { + get => Q("email.recipient_list.recipient"); + set => Q("email.recipient_list.recipient", value); + } + public string EmailRecipientListRecipientKeyword + { + get => Q("email.recipient_list.recipient.keyword"); + set => Q("email.recipient_list.recipient.keyword", value); + } + public bool? IsEnabled + { + get => Q("is_enabled"); + set => Q("is_enabled", value); + } + public long? LastUpdatedTimeMs + { + get => Q("last_updated_time_ms"); + set => Q("last_updated_time_ms", value); + } + public string MicrosoftTeamsUrl + { + get => Q("microsoft_teams.url"); + set => Q("microsoft_teams.url", value); + } + public string MicrosoftTeamsUrlKeyword + { + get => Q("microsoft_teams.url.keyword"); + set => Q("microsoft_teams.url.keyword", value); + } + public string Name + { + get => Q("name"); + set => Q("name", value); + } + public string NameKeyword + { + get => Q("name.keyword"); + set => Q("name.keyword", value); + } + public string Query + { + get => Q("query"); + set => Q("query", value); + } + public string SesAccountFromAddress + { + get => Q("ses_account.from_address"); + set => Q("ses_account.from_address", value); + } + public string SesAccountFromAddressKeyword + { + get => Q("ses_account.from_address.keyword"); + set => Q("ses_account.from_address.keyword", value); + } + public string SesAccountRegion + { + get => Q("ses_account.region"); + set => Q("ses_account.region", value); + } + public string SesAccountRoleArn + { + get => Q("ses_account.role_arn"); + set => Q("ses_account.role_arn", value); + } + public string SesAccountRoleArnKeyword + { + get => Q("ses_account.role_arn.keyword"); + set => Q("ses_account.role_arn.keyword", value); + } + public string SlackUrl + { + get => Q("slack.url"); + set => Q("slack.url", value); + } + public string SlackUrlKeyword + { + get => Q("slack.url.keyword"); + set => Q("slack.url.keyword", value); + } + public string SmtpAccountFromAddress + { + get => Q("smtp_account.from_address"); + set => Q("smtp_account.from_address", value); + } + public string SmtpAccountFromAddressKeyword + { + get => Q("smtp_account.from_address.keyword"); + set => Q("smtp_account.from_address.keyword", value); + } + public string SmtpAccountHost + { + get => Q("smtp_account.host"); + set => Q("smtp_account.host", value); + } + public string SmtpAccountHostKeyword + { + get => Q("smtp_account.host.keyword"); + set => Q("smtp_account.host.keyword", value); + } + public string SmtpAccountMethod + { + get => Q("smtp_account.method"); + set => Q("smtp_account.method", value); + } + public string SnsRoleArn + { + get => Q("sns.role_arn"); + set => Q("sns.role_arn", value); + } + public string SnsRoleArnKeyword + { + get => Q("sns.role_arn.keyword"); + set => Q("sns.role_arn.keyword", value); + } + public string SnsTopicArn + { + get => Q("sns.topic_arn"); + set => Q("sns.topic_arn", value); + } + public string SnsTopicArnKeyword + { + get => Q("sns.topic_arn.keyword"); + set => Q("sns.topic_arn.keyword", value); + } + public string TextQuery + { + get => Q("text_query"); + set => Q("text_query", value); + } + public string WebhookUrl + { + get => Q("webhook.url"); + set => Q("webhook.url", value); + } + public string WebhookUrlKeyword + { + get => Q("webhook.url.keyword"); + set => Q("webhook.url.keyword", value); + } + } + + /// Request options for ListChannels https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-channels + public partial class ListChannelsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for ListFeatures https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-supported-channel-configurations + public partial class ListFeaturesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for SendTest https://opensearch.org/docs/latest/observing-your-data/notifications/api/#send-test-notification + public partial class SendTestRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for UpdateConfig https://opensearch.org/docs/latest/observing-your-data/notifications/api/#update-channel-configuration + public partial class UpdateConfigRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Observability.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Observability.cs new file mode 100644 index 0000000000..aa0d8d2a78 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Observability.cs @@ -0,0 +1,123 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.ObservabilityApi +{ + /// Request options for CreateObject + public partial class CreateObjectRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for DeleteObject + public partial class DeleteObjectRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteObjects + public partial class DeleteObjectsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + + /// The ID of a single Observability Object to delete. + public string Objectid + { + get => Q("objectId"); + set => Q("objectId", value); + } + + /// A comma-separated list of Observability Object IDs to delete. + public string Objectidlist + { + get => Q("objectIdList"); + set => Q("objectIdList", value); + } + } + + /// Request options for GetLocalstats + public partial class GetLocalstatsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetObject + public partial class GetObjectRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for ListObjects + public partial class ListObjectsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for UpdateObject + public partial class UpdateObjectRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ppl.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ppl.cs new file mode 100644 index 0000000000..025743d3b5 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Ppl.cs @@ -0,0 +1,138 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.PplApi +{ + /// Request options for Explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + public partial class ExplainRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for GetStats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + public partial class GetStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for PostStats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + public partial class PostStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for Query https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + public partial class QueryRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Query.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Query.cs new file mode 100644 index 0000000000..d97b96e55b --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Query.cs @@ -0,0 +1,94 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.QueryApi +{ + /// Request options for DatasourceDelete + public partial class DatasourceDeleteRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DatasourceRetrieve + public partial class DatasourceRetrieveRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for DatasourcesCreate + public partial class DatasourcesCreateRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for DatasourcesList + public partial class DatasourcesListRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for DatasourcesUpdate + public partial class DatasourcesUpdateRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.RemoteStore.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.RemoteStore.cs new file mode 100644 index 0000000000..973e82aba2 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.RemoteStore.cs @@ -0,0 +1,76 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.RemoteStoreApi +{ + /// Request options for Restore https://opensearch.org/docs/latest/opensearch/remote/#restoring-from-a-backup + public partial class RestoreRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// Operation timeout for connection to cluster-manager node. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TimeSpan ClusterManagerTimeout + { + get => Q("cluster_manager_timeout"); + set => Q("cluster_manager_timeout", value); + } + + /// Should this request wait until the operation has completed before returning. + public bool? WaitForCompletion + { + get => Q("wait_for_completion"); + set => Q("wait_for_completion", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Rollups.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Rollups.cs new file mode 100644 index 0000000000..0d20869b2f --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Rollups.cs @@ -0,0 +1,110 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.RollupsApi +{ + /// Request options for Delete https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job + public partial class DeleteRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for Explain https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job + public partial class ExplainRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Get https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job + public partial class GetRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Put https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job + public partial class PutRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// Only perform the operation if the document has this primary term. + public long? IfPrimaryTerm + { + get => Q("if_primary_term"); + set => Q("if_primary_term", value); + } + + /// Only perform the operation if the document has this sequence number. + public long? IfSequenceNumber + { + get => Q("if_seq_no"); + set => Q("if_seq_no", value); + } + } + + /// Request options for Start https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + public partial class StartRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for Stop https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + public partial class StopRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.SearchPipeline.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.SearchPipeline.cs new file mode 100644 index 0000000000..fb64372cc9 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.SearchPipeline.cs @@ -0,0 +1,113 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.SearchPipelineApi +{ + /// Request options for Delete + public partial class DeleteRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + + /// Operation timeout for connection to cluster-manager node. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TimeSpan ClusterManagerTimeout + { + get => Q("cluster_manager_timeout"); + set => Q("cluster_manager_timeout", value); + } + + /// Operation timeout. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + } + + /// Request options for Get + public partial class GetRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// operation timeout for connection to cluster-manager node. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TimeSpan ClusterManagerTimeout + { + get => Q("cluster_manager_timeout"); + set => Q("cluster_manager_timeout", value); + } + } + + /// Request options for Put https://opensearch.org/docs/latest/search-plugins/search-pipelines/creating-search-pipeline/ + public partial class PutRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// operation timeout for connection to cluster-manager node. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TimeSpan ClusterManagerTimeout + { + get => Q("cluster_manager_timeout"); + set => Q("cluster_manager_timeout", value); + } + + /// Operation timeout. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Security.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Security.cs new file mode 100644 index 0000000000..c1ad557fca --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Security.cs @@ -0,0 +1,736 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.SecurityApi +{ + /// Request options for Authinfo + public partial class AuthinfoRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + + /// The type of current authentication request. + public string AuthType + { + get => Q("auth_type"); + set => Q("auth_type", value); + } + + /// Indicates whether a verbose response should be returned. + public bool? Verbose + { + get => Q("verbose"); + set => Q("verbose", value); + } + } + + /// Request options for Authtoken + public partial class AuthtokenRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for Cache + public partial class CacheRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => false; + } + + /// Request options for ChangePassword https://opensearch.org/docs/latest/security/access-control/api/#change-password + public partial class ChangePasswordRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for ConfigUpgradeCheck https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check + public partial class ConfigUpgradeCheckRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for ConfigUpgradePerform https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade + public partial class ConfigUpgradePerformRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for CreateActionGroup https://opensearch.org/docs/latest/security/access-control/api/#create-action-group + public partial class CreateActionGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateAllowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + public partial class CreateAllowlistRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateRole https://opensearch.org/docs/latest/security/access-control/api/#create-role + public partial class CreateRoleRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateRoleMapping https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping + public partial class CreateRoleMappingRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateTenant https://opensearch.org/docs/latest/security/access-control/api/#create-tenant + public partial class CreateTenantRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateUpdateTenancyConfig https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + public partial class CreateUpdateTenancyConfigRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateUser https://opensearch.org/docs/latest/security/access-control/api/#create-user + public partial class CreateUserRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for CreateUserLegacy + public partial class CreateUserLegacyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for DeleteActionGroup https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + public partial class DeleteActionGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteDistinguishedName https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names + public partial class DeleteDistinguishedNameRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteRole https://opensearch.org/docs/latest/security/access-control/api/#delete-role + public partial class DeleteRoleRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteRoleMapping https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping + public partial class DeleteRoleMappingRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteTenant https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + public partial class DeleteTenantRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteUser https://opensearch.org/docs/latest/security/access-control/api/#delete-user + public partial class DeleteUserRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for DeleteUserLegacy + public partial class DeleteUserLegacyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for FlushCache https://opensearch.org/docs/latest/security/access-control/api/#flush-cache + public partial class FlushCacheRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for GenerateOboToken https://opensearch.org/docs/latest/security/access-control/authentication-tokens/#api-endpoint + public partial class GenerateOboTokenRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for GenerateUserToken + public partial class GenerateUserTokenRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for GenerateUserTokenLegacy + public partial class GenerateUserTokenLegacyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for GetAccountDetails https://opensearch.org/docs/latest/security/access-control/api/#get-account-details + public partial class GetAccountDetailsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetActionGroup https://opensearch.org/docs/latest/security/access-control/api/#get-action-group + public partial class GetActionGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetActionGroups https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups + public partial class GetActionGroupsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetAllCertificates + public partial class GetAllCertificatesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// The type of certificates (HTTP, TRANSPORT, ALL) to retrieve from all nodes. + public string CertType + { + get => Q("cert_type"); + set => Q("cert_type", value); + } + + /// The maximum duration, in seconds, to be spent to retrieve certificates from all nodes. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + } + + /// Request options for GetAllowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + public partial class GetAllowlistRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetAuditConfiguration https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + public partial class GetAuditConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetCertificates https://opensearch.org/docs/latest/security/access-control/api/#get-certificates + public partial class GetCertificatesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetConfiguration https://opensearch.org/docs/latest/security/access-control/api/#get-configuration + public partial class GetConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetDashboardsInfo + public partial class GetDashboardsInfoRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetDistinguishedName https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + public partial class GetDistinguishedNameRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A boolean flag to include/exclude static nodes DN from final result. + public bool? ShowAll + { + get => Q("show_all"); + set => Q("show_all", value); + } + } + + /// Request options for GetDistinguishedNames https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + public partial class GetDistinguishedNamesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A boolean flag to include/exclude static nodes DN from final result. + public bool? ShowAll + { + get => Q("show_all"); + set => Q("show_all", value); + } + } + + /// Request options for GetNodeCertificates + public partial class GetNodeCertificatesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// The type of certificates (HTTP, TRANSPORT, ALL) to retrieve for a node. + public string CertType + { + get => Q("cert_type"); + set => Q("cert_type", value); + } + + /// The maximum duration, in seconds, to be spent to retrieve a node's certificates. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + } + + /// Request options for GetPermissionsInfo + public partial class GetPermissionsInfoRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetRole https://opensearch.org/docs/latest/security/access-control/api/#get-role + public partial class GetRoleRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetRoleMapping https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping + public partial class GetRoleMappingRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetRoleMappings https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings + public partial class GetRoleMappingsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetRoles https://opensearch.org/docs/latest/security/access-control/api/#get-roles + public partial class GetRolesRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetSslinfo + public partial class GetSslinfoRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A boolean flag to indicate whether all domain names should be returned. + public string ShowDn + { + get => Q("show_dn"); + set => Q("show_dn", value); + } + } + + /// Request options for GetTenancyConfig https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + public partial class GetTenancyConfigRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetTenant https://opensearch.org/docs/latest/security/access-control/api/#get-tenant + public partial class GetTenantRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetTenants https://opensearch.org/docs/latest/security/access-control/api/#get-tenants + public partial class GetTenantsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetUser https://opensearch.org/docs/latest/security/access-control/api/#get-user + public partial class GetUserRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetUserLegacy + public partial class GetUserLegacyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetUsers https://opensearch.org/docs/latest/security/access-control/api/#get-users + public partial class GetUsersRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for GetUsersLegacy + public partial class GetUsersLegacyRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Health https://opensearch.org/docs/latest/security/access-control/api/#health-check + public partial class HealthRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + + /// + /// A flag to indicate whether service should consider security-plugin's status before returning health response. `strict` mode indicates + /// service should check security plugin status. + /// + public string Mode + { + get => Q("mode"); + set => Q("mode", value); + } + } + + /// Request options for Migrate + public partial class MigrateRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for PatchActionGroup https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group + public partial class PatchActionGroupRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchActionGroups https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups + public partial class PatchActionGroupsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchAllowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + public partial class PatchAllowlistRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchAuditConfiguration https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + public partial class PatchAuditConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchConfiguration https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration + public partial class PatchConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchDistinguishedName + public partial class PatchDistinguishedNameRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchDistinguishedNames https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names + public partial class PatchDistinguishedNamesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchRole https://opensearch.org/docs/latest/security/access-control/api/#patch-role + public partial class PatchRoleRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchRoleMapping https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping + public partial class PatchRoleMappingRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchRoleMappings https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings + public partial class PatchRoleMappingsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchRoles https://opensearch.org/docs/latest/security/access-control/api/#patch-roles + public partial class PatchRolesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchTenant https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant + public partial class PatchTenantRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchTenants https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants + public partial class PatchTenantsRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchUser https://opensearch.org/docs/latest/security/access-control/api/#patch-user + public partial class PatchUserRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PatchUsers https://opensearch.org/docs/latest/security/access-control/api/#patch-users + public partial class PatchUsersRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PATCH; + public override bool SupportsBody => true; + } + + /// Request options for PostDashboardsInfo + public partial class PostDashboardsInfoRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for ReloadHttpCertificates https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates + public partial class ReloadHttpCertificatesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => false; + } + + /// Request options for ReloadTransportCertificates https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates + public partial class ReloadTransportCertificatesRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => false; + } + + /// Request options for TenantInfo + public partial class TenantInfoRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for UpdateAuditConfiguration https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + public partial class UpdateAuditConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for UpdateConfiguration https://opensearch.org/docs/latest/security/access-control/api/#update-configuration + public partial class UpdateConfigurationRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for UpdateDistinguishedName https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names + public partial class UpdateDistinguishedNameRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } + + /// Request options for Validate + public partial class ValidateRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A boolean flag to indicate whether invalid v6 configuration should be allowed. + public bool? AcceptInvalid + { + get => Q("accept_invalid"); + set => Q("accept_invalid", value); + } + } + + /// Request options for WhoAmI + public partial class WhoAmIRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for WhoAmIProtected + public partial class WhoAmIProtectedRequestParameters + : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Sql.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Sql.cs new file mode 100644 index 0000000000..769c56d6f0 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Sql.cs @@ -0,0 +1,173 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.SqlApi +{ + /// Request options for Close https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + public partial class CloseRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for Explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + public partial class ExplainRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for GetStats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + public partial class GetStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for PostStats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + public partial class PostStatsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for Query https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + public partial class QueryRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + + /// Specifies whether to escape special characters in the results. + public bool? Sanitize + { + get => Q("sanitize"); + set => Q("sanitize", value); + } + } + + /// Request options for Settings https://opensearch.org/docs/latest/search-plugins/sql/settings/ + public partial class SettingsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set => Q("format", value); + } + } +} diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Transforms.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Transforms.cs new file mode 100644 index 0000000000..1453e2f6ae --- /dev/null +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Transforms.cs @@ -0,0 +1,145 @@ +/* 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.Linq.Expressions; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace OpenSearch.Net.Specification.TransformsApi +{ + /// Request options for Delete https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#delete-a-transform-job + public partial class DeleteRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + /// Request options for Explain https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-the-status-of-a-transform-job + public partial class ExplainRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Get https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + public partial class GetRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + /// Request options for Preview https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results + public partial class PreviewRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + } + + /// Request options for Put https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#create-a-transform-job + public partial class PutRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + + /// Only perform the operation if the document has this primary term. + public long? IfPrimaryTerm + { + get => Q("if_primary_term"); + set => Q("if_primary_term", value); + } + + /// Only perform the operation if the document has this sequence number. + public long? IfSequenceNumber + { + get => Q("if_seq_no"); + set => Q("if_seq_no", value); + } + } + + /// Request options for Search https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + public partial class SearchRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + + /// The search term to use to filter results. + public string Search + { + get => Q("search"); + set => Q("search", value); + } + + /// Specifies the direction to sort results in. Can be `ASC` or `DESC`. Default is `ASC`. + public string Sortdirection + { + get => Q("sortDirection"); + set => Q("sortDirection", value); + } + + /// The field to sort results with. + public string Sortfield + { + get => Q("sortField"); + set => Q("sortField", value); + } + } + + /// Request options for Start https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#start-a-transform-job + public partial class StartRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + + /// Request options for Stop https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job + public partial class StopRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } +} diff --git a/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs b/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs index b8754c8283..9c909bb988 100644 --- a/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs +++ b/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs @@ -50,15 +50,30 @@ using System.Threading; using System.Threading.Tasks; using OpenSearch.Net; +using OpenSearch.Net.Specification.AsynchronousSearchApi; using OpenSearch.Net.Specification.CatApi; using OpenSearch.Net.Specification.ClusterApi; using OpenSearch.Net.Specification.DanglingIndicesApi; +using OpenSearch.Net.Specification.FlowFrameworkApi; using OpenSearch.Net.Specification.HttpApi; using OpenSearch.Net.Specification.IndicesApi; using OpenSearch.Net.Specification.IngestApi; +using OpenSearch.Net.Specification.IsmApi; +using OpenSearch.Net.Specification.KnnApi; +using OpenSearch.Net.Specification.MlApi; using OpenSearch.Net.Specification.NodesApi; +using OpenSearch.Net.Specification.NotificationsApi; +using OpenSearch.Net.Specification.ObservabilityApi; +using OpenSearch.Net.Specification.PplApi; +using OpenSearch.Net.Specification.QueryApi; +using OpenSearch.Net.Specification.RemoteStoreApi; +using OpenSearch.Net.Specification.RollupsApi; +using OpenSearch.Net.Specification.SearchPipelineApi; +using OpenSearch.Net.Specification.SecurityApi; using OpenSearch.Net.Specification.SnapshotApi; +using OpenSearch.Net.Specification.SqlApi; using OpenSearch.Net.Specification.TasksApi; +using OpenSearch.Net.Specification.TransformsApi; namespace OpenSearch.Net { @@ -67,6 +82,9 @@ namespace OpenSearch.Net /// public partial interface IOpenSearchLowLevelClient { + /// Asynchronous Search APIs + LowLevelAsynchronousSearchNamespace AsynchronousSearch { get; } + /// Cat APIs LowLevelCatNamespace Cat { get; } @@ -76,24 +94,66 @@ public partial interface IOpenSearchLowLevelClient /// Dangling Indices APIs LowLevelDanglingIndicesNamespace DanglingIndices { get; } + /// Flow Framework APIs + LowLevelFlowFrameworkNamespace FlowFramework { get; } + /// Indices APIs LowLevelIndicesNamespace Indices { get; } /// Ingest APIs LowLevelIngestNamespace Ingest { get; } + /// Ism APIs + LowLevelIsmNamespace Ism { get; } + + /// Knn APIs + LowLevelKnnNamespace Knn { get; } + + /// Ml APIs + LowLevelMlNamespace Ml { get; } + /// Nodes APIs LowLevelNodesNamespace Nodes { get; } /// Http APIs LowLevelHttpNamespace Http { get; } + /// Notifications APIs + LowLevelNotificationsNamespace Notifications { get; } + + /// Observability APIs + LowLevelObservabilityNamespace Observability { get; } + + /// Ppl APIs + LowLevelPplNamespace Ppl { get; } + + /// Query APIs + LowLevelQueryNamespace Query { get; } + + /// Remote Store APIs + LowLevelRemoteStoreNamespace RemoteStore { get; } + + /// Rollups APIs + LowLevelRollupsNamespace Rollups { get; } + + /// Search Pipeline APIs + LowLevelSearchPipelineNamespace SearchPipeline { get; } + + /// Security APIs + LowLevelSecurityNamespace Security { get; } + /// Snapshot APIs LowLevelSnapshotNamespace Snapshot { get; } + /// Sql APIs + LowLevelSqlNamespace Sql { get; } + /// Tasks APIs LowLevelTasksNamespace Tasks { get; } + /// Transforms APIs + LowLevelTransformsNamespace Transforms { get; } + /// POST on /_bulk https://opensearch.org/docs/latest/api-reference/document-apis/bulk/ /// /// Request specific configuration such as querystring parameters & request specific connection settings. diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.AsynchronousSearch.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.AsynchronousSearch.cs new file mode 100644 index 0000000000..3a2440b330 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.AsynchronousSearch.cs @@ -0,0 +1,195 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.AsynchronousSearchApi +{ + /// + /// Asynchronous Search APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelAsynchronousSearchNamespace : NamespacedClientProxy + { + internal LowLevelAsynchronousSearchNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_asynchronous_search/{id} https://opensearch.org/docs/latest/search-plugins/async/index/#delete-searches-and-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Delete( + string id, + DeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_asynchronous_search/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_asynchronous_search/{id} https://opensearch.org/docs/latest/search-plugins/async/index/#delete-searches-and-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("asynchronous_search.delete", "id")] + public Task DeleteAsync( + string id, + DeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_asynchronous_search/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_asynchronous_search/{id} https://opensearch.org/docs/latest/search-plugins/async/index/#get-partial-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Get(string id, GetRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_asynchronous_search/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_asynchronous_search/{id} https://opensearch.org/docs/latest/search-plugins/async/index/#get-partial-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("asynchronous_search.get", "id")] + public Task GetAsync( + string id, + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_asynchronous_search/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_asynchronous_search https://opensearch.org/docs/latest/search-plugins/async/index/#rest-api + /// The search definition using the Query DSL. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Search( + PostData body, + SearchRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_asynchronous_search", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_asynchronous_search https://opensearch.org/docs/latest/search-plugins/async/index/#rest-api + /// The search definition using the Query DSL. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("asynchronous_search.search", "body")] + public Task SearchAsync( + PostData body, + SearchRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_asynchronous_search", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_asynchronous_search/stats https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Stats(StatsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_asynchronous_search/stats", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_asynchronous_search/stats https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("asynchronous_search.stats", "")] + public Task StatsAsync( + StatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_asynchronous_search/stats", + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.FlowFramework.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.FlowFramework.cs new file mode 100644 index 0000000000..fb456e1a92 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.FlowFramework.cs @@ -0,0 +1,424 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.FlowFrameworkApi +{ + /// + /// Flow Framework APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelFlowFrameworkNamespace : NamespacedClientProxy + { + internal LowLevelFlowFrameworkNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_flow_framework/workflow https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Create( + PostData body, + CreateRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_flow_framework/workflow", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.create", "body")] + public Task CreateAsync( + PostData body, + CreateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_flow_framework/workflow", + ctx, + body, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/delete-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Delete( + string workflowId, + DeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/delete-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.delete", "workflow_id")] + public Task DeleteAsync( + string workflowId, + DeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/{workflow_id}/_deprovision https://opensearch.org/docs/latest/automating-configurations/api/deprovision-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Deprovision( + string workflowId, + DeprovisionRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_deprovision"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/{workflow_id}/_deprovision https://opensearch.org/docs/latest/automating-configurations/api/deprovision-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.deprovision", "workflow_id")] + public Task DeprovisionAsync( + string workflowId, + DeprovisionRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_deprovision"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/get-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Get( + string workflowId, + GetRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/get-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.get", "workflow_id")] + public Task GetAsync( + string workflowId, + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/{workflow_id}/_status https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-status/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse GetStatus( + string workflowId, + GetStatusRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_status"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/{workflow_id}/_status https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-status/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.get_status", "workflow_id")] + public Task GetStatusAsync( + string workflowId, + GetStatusRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_status"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/_steps https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-steps/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse GetSteps(GetStepsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_flow_framework/workflow/_steps", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_flow_framework/workflow/_steps https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-steps/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.get_steps", "")] + public Task GetStepsAsync( + GetStepsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_flow_framework/workflow/_steps", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/{workflow_id}/_provision https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Provision( + string workflowId, + PostData body, + ProvisionRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_provision"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/{workflow_id}/_provision https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.provision", "workflow_id, body")] + public Task ProvisionAsync( + string workflowId, + PostData body, + ProvisionRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}/_provision"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/_search https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Search( + PostData body, + SearchRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_flow_framework/workflow/_search", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/_search https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.search", "body")] + public Task SearchAsync( + PostData body, + SearchRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_flow_framework/workflow/_search", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/state/_search https://opensearch.org/docs/latest/automating-configurations/api/search-workflow-state/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse SearchState( + PostData body, + SearchStateRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_flow_framework/workflow/state/_search", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_flow_framework/workflow/state/_search https://opensearch.org/docs/latest/automating-configurations/api/search-workflow-state/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.search_state", "body")] + public Task SearchStateAsync( + PostData body, + SearchStateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_flow_framework/workflow/state/_search", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse Update( + string workflowId, + PostData body, + UpdateRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_flow_framework/workflow/{workflow_id} https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("flow_framework.update", "workflow_id, body")] + public Task UpdateAsync( + string workflowId, + PostData body, + UpdateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_flow_framework/workflow/{workflowId:workflowId}"), + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ism.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ism.cs new file mode 100644 index 0000000000..deb228aba3 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ism.cs @@ -0,0 +1,640 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.IsmApi +{ + /// + /// Ism APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelIsmNamespace : NamespacedClientProxy + { + internal LowLevelIsmNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_ism/add https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse AddPolicy( + PostData body, + AddPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest(POST, "_plugins/_ism/add", body, RequestParams(requestParameters)); + + /// POST on /_plugins/_ism/add https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.add_policy", "body")] + public Task AddPolicyAsync( + PostData body, + AddPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ism/add", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/add/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse AddPolicy( + string index, + PostData body, + AddPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ism/add/{index:index}"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/add/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.add_policy", "index, body")] + public Task AddPolicyAsync( + string index, + PostData body, + AddPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ism/add/{index:index}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/change_policy https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ChangePolicy( + PostData body, + ChangePolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ism/change_policy", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/change_policy https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.change_policy", "body")] + public Task ChangePolicyAsync( + PostData body, + ChangePolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ism/change_policy", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/change_policy/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ChangePolicy( + string index, + PostData body, + ChangePolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ism/change_policy/{index:index}"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/change_policy/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.change_policy", "index, body")] + public Task ChangePolicyAsync( + string index, + PostData body, + ChangePolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ism/change_policy/{index:index}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeletePolicy( + string policyId, + DeletePolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.delete_policy", "policy_id")] + public Task DeletePolicyAsync( + string policyId, + DeletePolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// HEAD on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ExistsPolicy( + string policyId, + ExistsPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + HEAD, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + null, + RequestParams(requestParameters) + ); + + /// HEAD on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.exists_policy", "policy_id")] + public Task ExistsPolicyAsync( + string policyId, + ExistsPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + HEAD, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/explain https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ExplainPolicy( + PostData body, + ExplainPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ism/explain", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/explain https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.explain_policy", "body")] + public Task ExplainPolicyAsync( + PostData body, + ExplainPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ism/explain", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/explain/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ExplainPolicy( + string index, + PostData body, + ExplainPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ism/explain/{index:index}"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/explain/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.explain_policy", "index, body")] + public Task ExplainPolicyAsync( + string index, + PostData body, + ExplainPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ism/explain/{index:index}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ism/policies https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetPolicies( + GetPoliciesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_ism/policies", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ism/policies https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.get_policies", "")] + public Task GetPoliciesAsync( + GetPoliciesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_ism/policies", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#put-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetPolicy( + string policyId, + GetPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#put-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.get_policy", "policy_id")] + public Task GetPolicyAsync( + string policyId, + GetPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_ism/policies https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PutPolicies( + PostData body, + PutPoliciesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_ism/policies", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_ism/policies https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.put_policies", "body")] + public Task PutPoliciesAsync( + PostData body, + PutPoliciesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_ism/policies", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PutPolicy( + string policyId, + PostData body, + PutPolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_ism/policies/{policy_id} https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.put_policy", "policy_id, body")] + public Task PutPolicyAsync( + string policyId, + PostData body, + PutPolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_ism/policies/{policyId:policyId}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_refresh_search_analyzers/{index} https://opensearch.org/docs/latest/im-plugin/refresh-analyzer/ + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RefreshSearchAnalyzers( + string index, + RefreshSearchAnalyzersRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_refresh_search_analyzers/{index:index}"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_refresh_search_analyzers/{index} https://opensearch.org/docs/latest/im-plugin/refresh-analyzer/ + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.refresh_search_analyzers", "index")] + public Task RefreshSearchAnalyzersAsync( + string index, + RefreshSearchAnalyzersRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_refresh_search_analyzers/{index:index}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/remove https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RemovePolicy( + RemovePolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ism/remove", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/remove https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.remove_policy", "")] + public Task RemovePolicyAsync( + RemovePolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ism/remove", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/remove/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RemovePolicy( + string index, + RemovePolicyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ism/remove/{index:index}"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/remove/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.remove_policy", "index")] + public Task RemovePolicyAsync( + string index, + RemovePolicyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ism/remove/{index:index}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/retry https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RetryIndex( + PostData body, + RetryIndexRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ism/retry", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/retry https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.retry_index", "body")] + public Task RetryIndexAsync( + PostData body, + RetryIndexRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ism/retry", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/retry/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RetryIndex( + string index, + PostData body, + RetryIndexRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ism/retry/{index:index}"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ism/retry/{index} https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + /// Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ism.retry_index", "index, body")] + public Task RetryIndexAsync( + string index, + PostData body, + RetryIndexRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ism/retry/{index:index}"), + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Knn.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Knn.cs new file mode 100644 index 0000000000..c697a2d427 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Knn.cs @@ -0,0 +1,404 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.KnnApi +{ + /// + /// Knn APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelKnnNamespace : NamespacedClientProxy + { + internal LowLevelKnnNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_knn/models/{model_id} https://opensearch.org/docs/latest/search-plugins/knn/api/#delete-model + /// The id of the model. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteModel( + string modelId, + DeleteModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_knn/models/{modelId:modelId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_knn/models/{model_id} https://opensearch.org/docs/latest/search-plugins/knn/api/#delete-model + /// The id of the model. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.delete_model", "model_id")] + public Task DeleteModelAsync( + string modelId, + DeleteModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_knn/models/{modelId:modelId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/models/{model_id} https://opensearch.org/docs/latest/search-plugins/knn/api/#get-model + /// The id of the model. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetModel( + string modelId, + GetModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_knn/models/{modelId:modelId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/models/{model_id} https://opensearch.org/docs/latest/search-plugins/knn/api/#get-model + /// The id of the model. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.get_model", "model_id")] + public Task GetModelAsync( + string modelId, + GetModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_knn/models/{modelId:modelId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/_search https://opensearch.org/docs/latest/search-plugins/knn/api/#search-model + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse SearchModels( + PostData body, + SearchModelsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_knn/models/_search", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/_search https://opensearch.org/docs/latest/search-plugins/knn/api/#search-model + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.search_models", "body")] + public Task SearchModelsAsync( + PostData body, + SearchModelsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_knn/models/_search", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/stats https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse StatsForAll(StatsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_knn/stats", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/stats https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.stats", "")] + public Task StatsForAllAsync( + StatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_knn/stats", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/{node_id}/stats https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// 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. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Stats( + string nodeId, + StatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_knn/{nodeId:nodeId}/stats"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/{node_id}/stats https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// 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. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.stats", "node_id")] + public Task StatsAsync( + string nodeId, + StatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_knn/{nodeId:nodeId}/stats"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/{node_id}/stats/{stat} https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// 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. + /// Comma-separated list of stats to retrieve; use the special string `_all` or Indices.All to retrieve all stats. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Stats( + string nodeId, + string stat, + StatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_knn/{nodeId:nodeId}/stats/{stat:stat}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/{node_id}/stats/{stat} https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// 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. + /// Comma-separated list of stats to retrieve; use the special string `_all` or Indices.All to retrieve all stats. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.stats", "node_id, stat")] + public Task StatsAsync( + string nodeId, + string stat, + StatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_knn/{nodeId:nodeId}/stats/{stat:stat}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/stats/{stat} https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// Comma-separated list of stats to retrieve; use the special string `_all` or Indices.All to retrieve all stats. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse StatsForAll( + string stat, + StatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_knn/stats/{stat:stat}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/stats/{stat} https://opensearch.org/docs/latest/search-plugins/knn/api/#stats + /// Comma-separated list of stats to retrieve; use the special string `_all` or Indices.All to retrieve all stats. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.stats", "stat")] + public Task StatsForAllAsync( + string stat, + StatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_knn/stats/{stat:stat}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/_train https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse TrainModel( + PostData body, + TrainModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_knn/models/_train", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/_train https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.train_model", "body")] + public Task TrainModelAsync( + PostData body, + TrainModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_knn/models/_train", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/{model_id}/_train https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model + /// The id of the model. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse TrainModel( + string modelId, + PostData body, + TrainModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_knn/models/{modelId:modelId}/_train"), + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_knn/models/{model_id}/_train https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model + /// The id of the model. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.train_model", "model_id, body")] + public Task TrainModelAsync( + string modelId, + PostData body, + TrainModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_knn/models/{modelId:modelId}/_train"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/warmup/{index} https://opensearch.org/docs/latest/search-plugins/knn/api/#warmup-operation + /// Comma-separated list of indices; use the special string `_all` or Indices.All to perform the operation on all indices. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Warmup( + string index, + WarmupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_knn/warmup/{index:index}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_knn/warmup/{index} https://opensearch.org/docs/latest/search-plugins/knn/api/#warmup-operation + /// Comma-separated list of indices; use the special string `_all` or Indices.All to perform the operation on all indices. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("knn.warmup", "index")] + public Task WarmupAsync( + string index, + WarmupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_knn/warmup/{index:index}"), + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ml.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ml.cs new file mode 100644 index 0000000000..7889c23005 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ml.cs @@ -0,0 +1,402 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.MlApi +{ + /// + /// Ml APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelMlNamespace : NamespacedClientProxy + { + internal LowLevelMlNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_ml/models/{model_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteModel( + string modelId, + DeleteModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_ml/models/{modelId:modelId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ml/models/{model_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_model", "model_id")] + public Task DeleteModelAsync( + string modelId, + DeleteModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_ml/models/{modelId:modelId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ml/model_groups/{model_group_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteModelGroup( + string modelGroupId, + DeleteModelGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_ml/model_groups/{modelGroupId:modelGroupId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ml/model_groups/{model_group_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_model_group", "model_group_id")] + public Task DeleteModelGroupAsync( + string modelGroupId, + DeleteModelGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_ml/model_groups/{modelGroupId:modelGroupId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ml/tasks/{task_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteTask( + string taskId, + DeleteTaskRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_ml/tasks/{taskId:taskId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_ml/tasks/{task_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_task", "task_id")] + public Task DeleteTaskAsync( + string taskId, + DeleteTaskRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_ml/tasks/{taskId:taskId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/{model_id}/_deploy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeployModel( + string modelId, + DeployModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ml/models/{modelId:modelId}/_deploy"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/{model_id}/_deploy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.deploy_model", "model_id")] + public Task DeployModelAsync( + string modelId, + DeployModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ml/models/{modelId:modelId}/_deploy"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/model_groups/{model_group_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetModelGroup( + string modelGroupId, + GetModelGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_ml/model_groups/{modelGroupId:modelGroupId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/model_groups/{model_group_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_model_group", "model_group_id")] + public Task GetModelGroupAsync( + string modelGroupId, + GetModelGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_ml/model_groups/{modelGroupId:modelGroupId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/tasks/{task_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetTask( + string taskId, + GetTaskRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_ml/tasks/{taskId:taskId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/tasks/{task_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_task", "task_id")] + public Task GetTaskAsync( + string taskId, + GetTaskRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_ml/tasks/{taskId:taskId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/_register + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RegisterModel( + PostData body, + RegisterModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ml/models/_register", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/_register + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.register_model", "body")] + public Task RegisterModelAsync( + PostData body, + RegisterModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ml/models/_register", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/model_groups/_register + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse RegisterModelGroup( + PostData body, + RegisterModelGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ml/model_groups/_register", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/model_groups/_register + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.register_model_group", "body")] + public Task RegisterModelGroupAsync( + PostData body, + RegisterModelGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ml/model_groups/_register", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/models/_search + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse SearchModels( + PostData body, + SearchModelsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_ml/models/_search", + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ml/models/_search + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.search_models", "body")] + public Task SearchModelsAsync( + PostData body, + SearchModelsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_ml/models/_search", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/{model_id}/_undeploy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse UndeployModel( + string modelId, + UndeployModelRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_ml/models/{modelId:modelId}/_undeploy"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ml/models/{model_id}/_undeploy + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.undeploy_model", "model_id")] + public Task UndeployModelAsync( + string modelId, + UndeployModelRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_ml/models/{modelId:modelId}/_undeploy"), + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Notifications.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Notifications.cs new file mode 100644 index 0000000000..efb55f937e --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Notifications.cs @@ -0,0 +1,381 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.NotificationsApi +{ + /// + /// Notifications APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelNotificationsNamespace : NamespacedClientProxy + { + internal LowLevelNotificationsNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#create-channel-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse CreateConfig( + PostData body, + CreateConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_notifications/configs", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#create-channel-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.create_config", "body")] + public Task CreateConfigAsync( + PostData body, + CreateConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_notifications/configs", + ctx, + body, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_notifications/configs/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + /// The ID of the channel configuration to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse DeleteConfig( + string configId, + DeleteConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_notifications/configs/{configId:configId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_notifications/configs/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + /// The ID of the channel configuration to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.delete_config", "config_id")] + public Task DeleteConfigAsync( + string configId, + DeleteConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_notifications/configs/{configId:configId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.2.0 or greater. + public TResponse DeleteConfigs( + DeleteConfigsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + "_plugins/_notifications/configs", + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.2.0 or greater. + [MapsApi("notifications.delete_configs", "")] + public Task DeleteConfigsAsync( + DeleteConfigsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + "_plugins/_notifications/configs", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/configs/{config_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse GetConfig( + string configId, + GetConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_notifications/configs/{configId:configId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/configs/{config_id} + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.get_config", "config_id")] + public Task GetConfigAsync( + string configId, + GetConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_notifications/configs/{configId:configId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-configurations + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse GetConfigs( + PostData body, + GetConfigsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_notifications/configs", + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/configs https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-configurations + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.get_configs", "body")] + public Task GetConfigsAsync( + PostData body, + GetConfigsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_notifications/configs", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/channels https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-channels + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse ListChannels( + ListChannelsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_notifications/channels", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/channels https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-channels + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.list_channels", "")] + public Task ListChannelsAsync( + ListChannelsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_notifications/channels", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/features https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-supported-channel-configurations + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse ListFeatures( + ListFeaturesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_notifications/features", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_notifications/features https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-supported-channel-configurations + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.list_features", "")] + public Task ListFeaturesAsync( + ListFeaturesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_notifications/features", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_notifications/feature/test/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#send-test-notification + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [Obsolete("Deprecated in version 2.3.0: Use the POST method instead.")] + public TResponse SendTest( + string configId, + SendTestRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_notifications/feature/test/{configId:configId}"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_notifications/feature/test/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#send-test-notification + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [Obsolete("Deprecated in version 2.3.0: Use the POST method instead.")] + [MapsApi("notifications.send_test", "config_id")] + public Task SendTestAsync( + string configId, + SendTestRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_notifications/feature/test/{configId:configId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_notifications/configs/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#update-channel-configuration + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse UpdateConfig( + string configId, + PostData body, + UpdateConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_notifications/configs/{configId:configId}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_notifications/configs/{config_id} https://opensearch.org/docs/latest/observing-your-data/notifications/api/#update-channel-configuration + /// + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("notifications.update_config", "config_id, body")] + public Task UpdateConfigAsync( + string configId, + PostData body, + UpdateConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_notifications/configs/{configId:configId}"), + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Observability.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Observability.cs new file mode 100644 index 0000000000..31a6bda070 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Observability.cs @@ -0,0 +1,309 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.ObservabilityApi +{ + /// + /// Observability APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelObservabilityNamespace : NamespacedClientProxy + { + internal LowLevelObservabilityNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_observability/object + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse CreateObject( + PostData body, + CreateObjectRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_observability/object", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_observability/object + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.create_object", "body")] + public Task CreateObjectAsync( + PostData body, + CreateObjectRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_observability/object", + ctx, + body, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse DeleteObject( + string objectId, + DeleteObjectRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_observability/object/{objectId:objectId}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.delete_object", "object_id")] + public Task DeleteObjectAsync( + string objectId, + DeleteObjectRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_observability/object/{objectId:objectId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_observability/object + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse DeleteObjects( + DeleteObjectsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + "_plugins/_observability/object", + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_observability/object + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.delete_objects", "")] + public Task DeleteObjectsAsync( + DeleteObjectsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + "_plugins/_observability/object", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/_local/stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse GetLocalstats( + GetLocalstatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_observability/_local/stats", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/_local/stats + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.get_localstats", "")] + public Task GetLocalstatsAsync( + GetLocalstatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_observability/_local/stats", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse GetObject( + string objectId, + GetObjectRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_observability/object/{objectId:objectId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.get_object", "object_id")] + public Task GetObjectAsync( + string objectId, + GetObjectRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_observability/object/{objectId:objectId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/object + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse ListObjects( + ListObjectsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_observability/object", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_observability/object + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.list_objects", "")] + public Task ListObjectsAsync( + ListObjectsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_observability/object", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + public TResponse UpdateObject( + string objectId, + PostData body, + UpdateObjectRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_observability/object/{objectId:objectId}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_observability/object/{object_id} + /// The ID of the Observability Object. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 1.1.0 or greater. + [MapsApi("observability.update_object", "object_id, body")] + public Task UpdateObjectAsync( + string objectId, + PostData body, + UpdateObjectRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_observability/object/{objectId:objectId}"), + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ppl.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ppl.cs new file mode 100644 index 0000000000..043d5abd34 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Ppl.cs @@ -0,0 +1,193 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.PplApi +{ + /// + /// Ppl APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelPplNamespace : NamespacedClientProxy + { + internal LowLevelPplNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_ppl/_explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Explain( + PostData body, + ExplainRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ppl/_explain", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ppl/_explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ppl.explain", "body")] + public Task ExplainAsync( + PostData body, + ExplainRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ppl/_explain", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ppl/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetStats(GetStatsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_ppl/stats", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_ppl/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ppl.get_stats", "")] + public Task GetStatsAsync( + GetStatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_ppl/stats", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ppl/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PostStats( + PostData body, + PostStatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_ppl/stats", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ppl/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ppl.post_stats", "body")] + public Task PostStatsAsync( + PostData body, + PostStatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ppl/stats", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_ppl https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Query( + PostData body, + QueryRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest(POST, "_plugins/_ppl", body, RequestParams(requestParameters)); + + /// POST on /_plugins/_ppl https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ppl.query", "body")] + public Task QueryAsync( + PostData body, + QueryRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_ppl", + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Query.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Query.cs new file mode 100644 index 0000000000..20a49494f0 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Query.cs @@ -0,0 +1,243 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.QueryApi +{ + /// + /// Query APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelQueryNamespace : NamespacedClientProxy + { + internal LowLevelQueryNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_query/_datasources/{datasource_name} + /// The Name of the DataSource to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse DatasourceDelete( + string datasourceName, + DatasourceDeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_query/_datasources/{datasourceName:datasourceName}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_query/_datasources/{datasource_name} + /// The Name of the DataSource to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("query.datasource_delete", "datasource_name")] + public Task DatasourceDeleteAsync( + string datasourceName, + DatasourceDeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_query/_datasources/{datasourceName:datasourceName}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_query/_datasources/{datasource_name} + /// The Name of the DataSource to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse DatasourceRetrieve( + string datasourceName, + DatasourceRetrieveRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_query/_datasources/{datasourceName:datasourceName}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_query/_datasources/{datasource_name} + /// The Name of the DataSource to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("query.datasource_retrieve", "datasource_name")] + public Task DatasourceRetrieveAsync( + string datasourceName, + DatasourceRetrieveRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_query/_datasources/{datasourceName:datasourceName}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_query/_datasources + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse DatasourcesCreate( + PostData body, + DatasourcesCreateRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_query/_datasources", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_query/_datasources + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("query.datasources_create", "body")] + public Task DatasourcesCreateAsync( + PostData body, + DatasourcesCreateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_query/_datasources", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_query/_datasources + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse DatasourcesList( + DatasourcesListRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_query/_datasources", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_query/_datasources + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("query.datasources_list", "")] + public Task DatasourcesListAsync( + DatasourcesListRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_query/_datasources", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_query/_datasources + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse DatasourcesUpdate( + PostData body, + DatasourcesUpdateRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_query/_datasources", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_query/_datasources + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("query.datasources_update", "body")] + public Task DatasourcesUpdateAsync( + PostData body, + DatasourcesUpdateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_query/_datasources", + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.RemoteStore.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.RemoteStore.cs new file mode 100644 index 0000000000..d057fc3d4e --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.RemoteStore.cs @@ -0,0 +1,105 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.RemoteStoreApi +{ + /// + /// Remote Store APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelRemoteStoreNamespace : NamespacedClientProxy + { + internal LowLevelRemoteStoreNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_remotestore/_restore https://opensearch.org/docs/latest/opensearch/remote/#restoring-from-a-backup + /// Comma-separated list of index IDs. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Restore( + PostData body, + RestoreRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_remotestore/_restore", + body, + RequestParams(requestParameters) + ); + + /// POST on /_remotestore/_restore https://opensearch.org/docs/latest/opensearch/remote/#restoring-from-a-backup + /// Comma-separated list of index IDs. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("remote_store.restore", "body")] + public Task RestoreAsync( + PostData body, + RestoreRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_remotestore/_restore", + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Rollups.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Rollups.cs new file mode 100644 index 0000000000..adb8b7b22f --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Rollups.cs @@ -0,0 +1,268 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.RollupsApi +{ + /// + /// Rollups APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelRollupsNamespace : NamespacedClientProxy + { + internal LowLevelRollupsNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Delete( + string id, + DeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_rollup/jobs/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.delete", "id")] + public Task DeleteAsync( + string id, + DeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_rollup/jobs/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_rollup/jobs/{id}/_explain https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Explain( + string id, + ExplainRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_rollup/jobs/{id:id}/_explain"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_rollup/jobs/{id}/_explain https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.explain", "id")] + public Task ExplainAsync( + string id, + ExplainRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_rollup/jobs/{id:id}/_explain"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Get(string id, GetRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_rollup/jobs/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.get", "id")] + public Task GetAsync( + string id, + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_rollup/jobs/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job + /// Rollup to access. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Put( + string id, + PostData body, + PutRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_rollup/jobs/{id:id}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_rollup/jobs/{id} https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job + /// Rollup to access. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.put", "id, body")] + public Task PutAsync( + string id, + PostData body, + PutRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_rollup/jobs/{id:id}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_rollup/jobs/{id}/_start https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Start( + string id, + StartRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_rollup/jobs/{id:id}/_start"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_rollup/jobs/{id}/_start https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.start", "id")] + public Task StartAsync( + string id, + StartRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_rollup/jobs/{id:id}/_start"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_rollup/jobs/{id}/_stop https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Stop(string id, StopRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_rollup/jobs/{id:id}/_stop"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_rollup/jobs/{id}/_stop https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job + /// Rollup to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("rollups.stop", "id")] + public Task StopAsync( + string id, + StopRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_rollup/jobs/{id:id}/_stop"), + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.SearchPipeline.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.SearchPipeline.cs new file mode 100644 index 0000000000..668e116d85 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.SearchPipeline.cs @@ -0,0 +1,202 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.SearchPipelineApi +{ + /// + /// Search Pipeline APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelSearchPipelineNamespace : NamespacedClientProxy + { + internal LowLevelSearchPipelineNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_search/pipeline/{id} + /// Pipeline ID. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + public TResponse Delete( + string id, + DeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_search/pipeline/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_search/pipeline/{id} + /// Pipeline ID. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + [MapsApi("search_pipeline.delete", "id")] + public Task DeleteAsync( + string id, + DeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_search/pipeline/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_search/pipeline + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + public TResponse Get(GetRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest(GET, "_search/pipeline", null, RequestParams(requestParameters)); + + /// GET on /_search/pipeline + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + [MapsApi("search_pipeline.get", "")] + public Task GetAsync( + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_search/pipeline", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_search/pipeline/{id} + /// Comma-separated list of search pipeline ids. Wildcards supported. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + public TResponse Get(string id, GetRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_search/pipeline/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_search/pipeline/{id} + /// Comma-separated list of search pipeline ids. Wildcards supported. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + [MapsApi("search_pipeline.get", "id")] + public Task GetAsync( + string id, + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_search/pipeline/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_search/pipeline/{id} https://opensearch.org/docs/latest/search-plugins/search-pipelines/creating-search-pipeline/ + /// Pipeline ID. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + public TResponse Put( + string id, + PostData body, + PutRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_search/pipeline/{id:id}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_search/pipeline/{id} https://opensearch.org/docs/latest/search-plugins/search-pipelines/creating-search-pipeline/ + /// Pipeline ID. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.9.0 or greater. + [MapsApi("search_pipeline.put", "id, body")] + public Task PutAsync( + string id, + PostData body, + PutRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_search/pipeline/{id:id}"), + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Security.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Security.cs new file mode 100644 index 0000000000..70e5bb6614 --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Security.cs @@ -0,0 +1,2555 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.SecurityApi +{ + /// + /// Security APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelSecurityNamespace : NamespacedClientProxy + { + internal LowLevelSecurityNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_security/authinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Authinfo(AuthinfoRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/authinfo", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/authinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.authinfo", "")] + public Task AuthinfoAsync( + AuthinfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/authinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/authtoken + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Authtoken(AuthtokenRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/api/authtoken", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/authtoken + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.authtoken", "")] + public Task AuthtokenAsync( + AuthtokenRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/api/authtoken", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/cache + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Cache(CacheRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/cache", + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/cache + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.cache", "")] + public Task CacheAsync( + CacheRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/cache", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/account https://opensearch.org/docs/latest/security/access-control/api/#change-password + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse ChangePassword( + PostData body, + ChangePasswordRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/account", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/account https://opensearch.org/docs/latest/security/access-control/api/#change-password + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.change_password", "body")] + public Task ChangePasswordAsync( + PostData body, + ChangePasswordRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/account", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/_upgrade_check https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.14.0 or greater. + public TResponse ConfigUpgradeCheck( + ConfigUpgradeCheckRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/_upgrade_check", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/_upgrade_check https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.14.0 or greater. + [MapsApi("security.config_upgrade_check", "")] + public Task ConfigUpgradeCheckAsync( + ConfigUpgradeCheckRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/_upgrade_check", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/_upgrade_perform https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.14.0 or greater. + public TResponse ConfigUpgradePerform( + PostData body, + ConfigUpgradePerformRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/api/_upgrade_perform", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/_upgrade_perform https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.14.0 or greater. + [MapsApi("security.config_upgrade_perform", "body")] + public Task ConfigUpgradePerformAsync( + PostData body, + ConfigUpgradePerformRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/api/_upgrade_perform", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#create-action-group + /// The name of the action group to create or replace. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateActionGroup( + string actionGroup, + PostData body, + CreateActionGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#create-action-group + /// The name of the action group to create or replace. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_action_group", "action_group, body")] + public Task CreateActionGroupAsync( + string actionGroup, + PostData body, + CreateActionGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + public TResponse CreateAllowlist( + PostData body, + CreateAllowlistRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/allowlist", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + [MapsApi("security.create_allowlist", "body")] + public Task CreateAllowlistAsync( + PostData body, + CreateAllowlistRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/allowlist", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#create-role + /// The name of the role to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateRole( + string role, + PostData body, + CreateRoleRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/roles/{role:role}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#create-role + /// The name of the role to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_role", "role, body")] + public Task CreateRoleAsync( + string role, + PostData body, + CreateRoleRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/roles/{role:role}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping + /// The name of the role to create a role mapping for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateRoleMapping( + string role, + PostData body, + CreateRoleMappingRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping + /// The name of the role to create a role mapping for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_role_mapping", "role, body")] + public Task CreateRoleMappingAsync( + string role, + PostData body, + CreateRoleMappingRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#create-tenant + /// The name of the tenant to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateTenant( + string tenant, + PostData body, + CreateTenantRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#create-tenant + /// The name of the tenant to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_tenant", "tenant, body")] + public Task CreateTenantAsync( + string tenant, + PostData body, + CreateTenantRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/tenancy/config https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse CreateUpdateTenancyConfig( + PostData body, + CreateUpdateTenancyConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/tenancy/config", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/tenancy/config https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("security.create_update_tenancy_config", "body")] + public Task CreateUpdateTenancyConfigAsync( + PostData body, + CreateUpdateTenancyConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/tenancy/config", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#create-user + /// The name of the user to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateUser( + string username, + PostData body, + CreateUserRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/internalusers/{username:username}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#create-user + /// The name of the user to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_user", "username, body")] + public Task CreateUserAsync( + string username, + PostData body, + CreateUserRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/internalusers/{username:username}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/user/{username} + /// The name of the user to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse CreateUserLegacy( + string username, + PostData body, + CreateUserLegacyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/user/{username:username}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/user/{username} + /// The name of the user to be created. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_user_legacy", "username, body")] + public Task CreateUserLegacyAsync( + string username, + PostData body, + CreateUserLegacyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/user/{username:username}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + /// The name of the action group to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteActionGroup( + string actionGroup, + DeleteActionGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + /// The name of the action group to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_action_group", "action_group")] + public Task DeleteActionGroupAsync( + string actionGroup, + DeleteActionGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names + /// The cluster-name to delete from list of distinguished names. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteDistinguishedName( + string clusterName, + DeleteDistinguishedNameRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names + /// The cluster-name to delete from list of distinguished names. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_distinguished_name", "cluster_name")] + public Task DeleteDistinguishedNameAsync( + string clusterName, + DeleteDistinguishedNameRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#delete-role + /// The name of the role to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteRole( + string role, + DeleteRoleRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/roles/{role:role}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#delete-role + /// The name of the role to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_role", "role")] + public Task DeleteRoleAsync( + string role, + DeleteRoleRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/roles/{role:role}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping + /// The name of the role whose mapping needs to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteRoleMapping( + string role, + DeleteRoleMappingRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping + /// The name of the role whose mapping needs to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_role_mapping", "role")] + public Task DeleteRoleMappingAsync( + string role, + DeleteRoleMappingRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + /// The name of the tenant to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteTenant( + string tenant, + DeleteTenantRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group + /// The name of the tenant to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_tenant", "tenant")] + public Task DeleteTenantAsync( + string tenant, + DeleteTenantRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#delete-user + /// The name of the user to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteUser( + string username, + DeleteUserRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/internalusers/{username:username}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#delete-user + /// The name of the user to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_user", "username")] + public Task DeleteUserAsync( + string username, + DeleteUserRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/internalusers/{username:username}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/user/{username} + /// The name of the user to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeleteUserLegacy( + string username, + DeleteUserLegacyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_security/api/user/{username:username}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/user/{username} + /// The name of the user to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_user_legacy", "username")] + public Task DeleteUserLegacyAsync( + string username, + DeleteUserLegacyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_security/api/user/{username:username}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/cache https://opensearch.org/docs/latest/security/access-control/api/#flush-cache + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse FlushCache(FlushCacheRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + "_plugins/_security/api/cache", + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_security/api/cache https://opensearch.org/docs/latest/security/access-control/api/#flush-cache + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.flush_cache", "")] + public Task FlushCacheAsync( + FlushCacheRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + "_plugins/_security/api/cache", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/generateonbehalfoftoken https://opensearch.org/docs/latest/security/access-control/authentication-tokens/#api-endpoint + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + public TResponse GenerateOboToken( + PostData body, + GenerateOboTokenRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/api/generateonbehalfoftoken", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/generateonbehalfoftoken https://opensearch.org/docs/latest/security/access-control/authentication-tokens/#api-endpoint + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.12.0 or greater. + [MapsApi("security.generate_obo_token", "body")] + public Task GenerateOboTokenAsync( + PostData body, + GenerateOboTokenRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/api/generateonbehalfoftoken", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/internalusers/{username}/authtoken + /// The name of the user for whom an auth token is to be vended. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse GenerateUserToken( + string username, + GenerateUserTokenRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_security/api/internalusers/{username:username}/authtoken"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/internalusers/{username}/authtoken + /// The name of the user for whom an auth token is to be vended. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("security.generate_user_token", "username")] + public Task GenerateUserTokenAsync( + string username, + GenerateUserTokenRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_security/api/internalusers/{username:username}/authtoken"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/user/{username}/authtoken + /// The name of the user for whom an auth token is to be vended. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse GenerateUserTokenLegacy( + string username, + GenerateUserTokenLegacyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_security/api/user/{username:username}/authtoken"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/user/{username}/authtoken + /// The name of the user for whom an auth token is to be vended. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("security.generate_user_token_legacy", "username")] + public Task GenerateUserTokenLegacyAsync( + string username, + GenerateUserTokenLegacyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_security/api/user/{username:username}/authtoken"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/account https://opensearch.org/docs/latest/security/access-control/api/#get-account-details + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetAccountDetails( + GetAccountDetailsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/account", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/account https://opensearch.org/docs/latest/security/access-control/api/#get-account-details + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_account_details", "")] + public Task GetAccountDetailsAsync( + GetAccountDetailsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/account", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#get-action-group + /// The name of the action group to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetActionGroup( + string actionGroup, + GetActionGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#get-action-group + /// The name of the action group to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_action_group", "action_group")] + public Task GetActionGroupAsync( + string actionGroup, + GetActionGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/actiongroups https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetActionGroups( + GetActionGroupsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/actiongroups", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/actiongroups https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_action_groups", "")] + public Task GetActionGroupsAsync( + GetActionGroupsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/actiongroups", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.15.0 or greater. + public TResponse GetAllCertificates( + GetAllCertificatesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/certificates", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.15.0 or greater. + [MapsApi("security.get_all_certificates", "")] + public Task GetAllCertificatesAsync( + GetAllCertificatesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/certificates", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + public TResponse GetAllowlist( + GetAllowlistRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/allowlist", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + [MapsApi("security.get_allowlist", "")] + public Task GetAllowlistAsync( + GetAllowlistRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/allowlist", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/audit https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetAuditConfiguration( + GetAuditConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/audit", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/audit https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_audit_configuration", "")] + public Task GetAuditConfigurationAsync( + GetAuditConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/audit", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/ssl/certs https://opensearch.org/docs/latest/security/access-control/api/#get-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse GetCertificates( + GetCertificatesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/ssl/certs", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/ssl/certs https://opensearch.org/docs/latest/security/access-control/api/#get-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("security.get_certificates", "")] + public Task GetCertificatesAsync( + GetCertificatesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/ssl/certs", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/securityconfig https://opensearch.org/docs/latest/security/access-control/api/#get-configuration + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + public TResponse GetConfiguration( + GetConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/securityconfig", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/securityconfig https://opensearch.org/docs/latest/security/access-control/api/#get-configuration + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + [MapsApi("security.get_configuration", "")] + public Task GetConfigurationAsync( + GetConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/securityconfig", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/dashboardsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetDashboardsInfo( + GetDashboardsInfoRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/dashboardsinfo", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/dashboardsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_dashboards_info", "")] + public Task GetDashboardsInfoAsync( + GetDashboardsInfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/dashboardsinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + /// The cluster-name to retrieve nodes DN setting for. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetDistinguishedName( + string clusterName, + GetDistinguishedNameRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + /// The cluster-name to retrieve nodes DN setting for. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_distinguished_name", "cluster_name")] + public Task GetDistinguishedNameAsync( + string clusterName, + GetDistinguishedNameRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/nodesdn https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetDistinguishedNames( + GetDistinguishedNamesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/nodesdn", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/nodesdn https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_distinguished_names", "")] + public Task GetDistinguishedNamesAsync( + GetDistinguishedNamesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/nodesdn", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/certificates/{node_id} + /// The full-id of the node to retrieve certificates. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.15.0 or greater. + public TResponse GetNodeCertificates( + string nodeId, + GetNodeCertificatesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/certificates/{nodeId:nodeId}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/certificates/{node_id} + /// The full-id of the node to retrieve certificates. + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.15.0 or greater. + [MapsApi("security.get_node_certificates", "node_id")] + public Task GetNodeCertificatesAsync( + string nodeId, + GetNodeCertificatesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/certificates/{nodeId:nodeId}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/permissionsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetPermissionsInfo( + GetPermissionsInfoRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/permissionsinfo", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/permissionsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_permissions_info", "")] + public Task GetPermissionsInfoAsync( + GetPermissionsInfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/permissionsinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#get-role + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetRole( + string role, + GetRoleRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/roles/{role:role}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#get-role + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role", "role")] + public Task GetRoleAsync( + string role, + GetRoleRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/roles/{role:role}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetRoleMapping( + string role, + GetRoleMappingRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role_mapping", "role")] + public Task GetRoleMappingAsync( + string role, + GetRoleMappingRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/rolesmapping https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetRoleMappings( + GetRoleMappingsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/rolesmapping", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/rolesmapping https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role_mappings", "")] + public Task GetRoleMappingsAsync( + GetRoleMappingsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/rolesmapping", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/roles https://opensearch.org/docs/latest/security/access-control/api/#get-roles + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetRoles(GetRolesRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/roles", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/roles https://opensearch.org/docs/latest/security/access-control/api/#get-roles + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_roles", "")] + public Task GetRolesAsync( + GetRolesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/roles", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_opendistro/_security/sslinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetSslinfo(GetSslinfoRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_opendistro/_security/sslinfo", + null, + RequestParams(requestParameters) + ); + + /// GET on /_opendistro/_security/sslinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_sslinfo", "")] + public Task GetSslinfoAsync( + GetSslinfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_opendistro/_security/sslinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenancy/config https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + public TResponse GetTenancyConfig( + GetTenancyConfigRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/tenancy/config", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenancy/config https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.7.0 or greater. + [MapsApi("security.get_tenancy_config", "")] + public Task GetTenancyConfigAsync( + GetTenancyConfigRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/tenancy/config", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#get-tenant + /// The name of the tenant to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetTenant( + string tenant, + GetTenantRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#get-tenant + /// The name of the tenant to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_tenant", "tenant")] + public Task GetTenantAsync( + string tenant, + GetTenantRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenants https://opensearch.org/docs/latest/security/access-control/api/#get-tenants + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetTenants(GetTenantsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/tenants", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/tenants https://opensearch.org/docs/latest/security/access-control/api/#get-tenants + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_tenants", "")] + public Task GetTenantsAsync( + GetTenantsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/tenants", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#get-user + /// The name of the user to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetUser( + string username, + GetUserRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/internalusers/{username:username}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#get-user + /// The name of the user to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_user", "username")] + public Task GetUserAsync( + string username, + GetUserRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/internalusers/{username:username}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/user/{username} + /// The name of the user to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetUserLegacy( + string username, + GetUserLegacyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_security/api/user/{username:username}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/user/{username} + /// The name of the user to retrieve. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_user_legacy", "username")] + public Task GetUserLegacyAsync( + string username, + GetUserLegacyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_security/api/user/{username:username}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/internalusers https://opensearch.org/docs/latest/security/access-control/api/#get-users + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetUsers(GetUsersRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/internalusers", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/internalusers https://opensearch.org/docs/latest/security/access-control/api/#get-users + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_users", "")] + public Task GetUsersAsync( + GetUsersRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/internalusers", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/user + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetUsersLegacy( + GetUsersLegacyRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/user", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/user + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_users_legacy", "")] + public Task GetUsersLegacyAsync( + GetUsersLegacyRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/user", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/health https://opensearch.org/docs/latest/security/access-control/api/#health-check + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Health(HealthRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/health", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/health https://opensearch.org/docs/latest/security/access-control/api/#health-check + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.health", "")] + public Task HealthAsync( + HealthRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/health", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/migrate + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Migrate(MigrateRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/api/migrate", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/api/migrate + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.migrate", "")] + public Task MigrateAsync( + MigrateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/api/migrate", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group + /// The name of the action group to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchActionGroup( + string actionGroup, + PostData body, + PatchActionGroupRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/actiongroups/{action_group} https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group + /// The name of the action group to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_action_group", "action_group, body")] + public Task PatchActionGroupAsync( + string actionGroup, + PostData body, + PatchActionGroupRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/actiongroups/{actionGroup:actionGroup}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/actiongroups https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchActionGroups( + PostData body, + PatchActionGroupsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/actiongroups", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/actiongroups https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_action_groups", "body")] + public Task PatchActionGroupsAsync( + PostData body, + PatchActionGroupsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/actiongroups", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + public TResponse PatchAllowlist( + PostData body, + PatchAllowlistRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/allowlist", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/allowlist https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.1.0 or greater. + [MapsApi("security.patch_allowlist", "body")] + public Task PatchAllowlistAsync( + PostData body, + PatchAllowlistRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/allowlist", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/audit https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchAuditConfiguration( + PostData body, + PatchAuditConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/audit", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/audit https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_audit_configuration", "body")] + public Task PatchAuditConfigurationAsync( + PostData body, + PatchAuditConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/audit", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/securityconfig https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + public TResponse PatchConfiguration( + PostData body, + PatchConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/securityconfig", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/securityconfig https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + [MapsApi("security.patch_configuration", "body")] + public Task PatchConfigurationAsync( + PostData body, + PatchConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/securityconfig", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/nodesdn/{cluster_name} + /// The cluster-name to update nodesDn value. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchDistinguishedName( + string clusterName, + PostData body, + PatchDistinguishedNameRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/nodesdn/{cluster_name} + /// The cluster-name to update nodesDn value. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_distinguished_name", "cluster_name, body")] + public Task PatchDistinguishedNameAsync( + string clusterName, + PostData body, + PatchDistinguishedNameRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/nodesdn https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchDistinguishedNames( + PostData body, + PatchDistinguishedNamesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/nodesdn", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/nodesdn https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_distinguished_names", "body")] + public Task PatchDistinguishedNamesAsync( + PostData body, + PatchDistinguishedNamesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/nodesdn", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#patch-role + /// The name of the role to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchRole( + string role, + PostData body, + PatchRoleRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/roles/{role:role}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/roles/{role} https://opensearch.org/docs/latest/security/access-control/api/#patch-role + /// The name of the role to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_role", "role, body")] + public Task PatchRoleAsync( + string role, + PostData body, + PatchRoleRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/roles/{role:role}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping + /// The name of the role to update role-mapping for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchRoleMapping( + string role, + PostData body, + PatchRoleMappingRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/rolesmapping/{role} https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping + /// The name of the role to update role-mapping for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_role_mapping", "role, body")] + public Task PatchRoleMappingAsync( + string role, + PostData body, + PatchRoleMappingRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/rolesmapping/{role:role}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/rolesmapping https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchRoleMappings( + PostData body, + PatchRoleMappingsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/rolesmapping", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/rolesmapping https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_role_mappings", "body")] + public Task PatchRoleMappingsAsync( + PostData body, + PatchRoleMappingsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/rolesmapping", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/roles https://opensearch.org/docs/latest/security/access-control/api/#patch-roles + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchRoles( + PostData body, + PatchRolesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/roles", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/roles https://opensearch.org/docs/latest/security/access-control/api/#patch-roles + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_roles", "body")] + public Task PatchRolesAsync( + PostData body, + PatchRolesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/roles", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant + /// The name of the tenant to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchTenant( + string tenant, + PostData body, + PatchTenantRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/tenants/{tenant} https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant + /// The name of the tenant to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_tenant", "tenant, body")] + public Task PatchTenantAsync( + string tenant, + PostData body, + PatchTenantRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/tenants/{tenant:tenant}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/tenants https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchTenants( + PostData body, + PatchTenantsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/tenants", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/tenants https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_tenants", "body")] + public Task PatchTenantsAsync( + PostData body, + PatchTenantsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/tenants", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#patch-user + /// The name of the user to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchUser( + string username, + PostData body, + PatchUserRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + Url($"_plugins/_security/api/internalusers/{username:username}"), + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/internalusers/{username} https://opensearch.org/docs/latest/security/access-control/api/#patch-user + /// The name of the user to update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_user", "username, body")] + public Task PatchUserAsync( + string username, + PostData body, + PatchUserRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + Url($"_plugins/_security/api/internalusers/{username:username}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/internalusers https://opensearch.org/docs/latest/security/access-control/api/#patch-users + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PatchUsers( + PostData body, + PatchUsersRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PATCH, + "_plugins/_security/api/internalusers", + body, + RequestParams(requestParameters) + ); + + /// PATCH on /_plugins/_security/api/internalusers https://opensearch.org/docs/latest/security/access-control/api/#patch-users + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.patch_users", "body")] + public Task PatchUsersAsync( + PostData body, + PatchUsersRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PATCH, + "_plugins/_security/api/internalusers", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/dashboardsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PostDashboardsInfo( + PostDashboardsInfoRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/dashboardsinfo", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/dashboardsinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.post_dashboards_info", "")] + public Task PostDashboardsInfoAsync( + PostDashboardsInfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/dashboardsinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/ssl/http/reloadcerts https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.8.0 or greater. + public TResponse ReloadHttpCertificates( + ReloadHttpCertificatesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/ssl/http/reloadcerts", + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/ssl/http/reloadcerts https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.8.0 or greater. + [MapsApi("security.reload_http_certificates", "")] + public Task ReloadHttpCertificatesAsync( + ReloadHttpCertificatesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/ssl/http/reloadcerts", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/ssl/transport/reloadcerts https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.8.0 or greater. + public TResponse ReloadTransportCertificates( + ReloadTransportCertificatesRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/ssl/transport/reloadcerts", + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/ssl/transport/reloadcerts https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.8.0 or greater. + [MapsApi("security.reload_transport_certificates", "")] + public Task ReloadTransportCertificatesAsync( + ReloadTransportCertificatesRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/ssl/transport/reloadcerts", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/tenantinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse TenantInfo(TenantInfoRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/tenantinfo", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/tenantinfo + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.tenant_info", "")] + public Task TenantInfoAsync( + TenantInfoRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/tenantinfo", + ctx, + null, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/audit/config https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse UpdateAuditConfiguration( + PostData body, + UpdateAuditConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/audit/config", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/audit/config https://opensearch.org/docs/latest/security/access-control/api/#audit-logs + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.update_audit_configuration", "body")] + public Task UpdateAuditConfigurationAsync( + PostData body, + UpdateAuditConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/audit/config", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/securityconfig/config https://opensearch.org/docs/latest/security/access-control/api/#update-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + public TResponse UpdateConfiguration( + PostData body, + UpdateConfigurationRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_security/api/securityconfig/config", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/securityconfig/config https://opensearch.org/docs/latest/security/access-control/api/#update-configuration + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.10.0 or greater. + [MapsApi("security.update_configuration", "body")] + public Task UpdateConfigurationAsync( + PostData body, + UpdateConfigurationRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_security/api/securityconfig/config", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names + /// The cluster-name to create/update nodesDn value for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse UpdateDistinguishedName( + string clusterName, + PostData body, + UpdateDistinguishedNameRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_security/api/nodesdn/{cluster_name} https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names + /// The cluster-name to create/update nodesDn value for. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.update_distinguished_name", "cluster_name, body")] + public Task UpdateDistinguishedNameAsync( + string clusterName, + PostData body, + UpdateDistinguishedNameRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_security/api/nodesdn/{clusterName:clusterName}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/validate + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Validate(ValidateRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/api/validate", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/api/validate + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.validate", "")] + public Task ValidateAsync( + ValidateRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/api/validate", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/whoami + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public TResponse WhoAmI(WhoAmIRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_security/whoami", + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_security/whoami + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + [MapsApi("security.who_am_i", "")] + public Task WhoAmIAsync( + WhoAmIRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_security/whoami", + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/whoamiprotected + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.11.0 or greater. + public TResponse WhoAmIProtected( + WhoAmIProtectedRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_security/whoamiprotected", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_security/whoamiprotected + /// Request specific configuration such as querystring parameters & request specific connection settings. + /// Supported by OpenSearch servers of version 2.11.0 or greater. + [MapsApi("security.who_am_i_protected", "")] + public Task WhoAmIProtectedAsync( + WhoAmIProtectedRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_security/whoamiprotected", + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Sql.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Sql.cs new file mode 100644 index 0000000000..19c0e5f17b --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Sql.cs @@ -0,0 +1,259 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.SqlApi +{ + /// + /// Sql APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelSqlNamespace : NamespacedClientProxy + { + internal LowLevelSqlNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// POST on /_plugins/_sql/close https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Close( + PostData body, + CloseRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_sql/close", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql/close https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.close", "body")] + public Task CloseAsync( + PostData body, + CloseRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_sql/close", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql/_explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Explain( + PostData body, + ExplainRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_sql/_explain", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql/_explain https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.explain", "body")] + public Task ExplainAsync( + PostData body, + ExplainRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_sql/_explain", + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_sql/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetStats(GetStatsRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_sql/stats", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_sql/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.get_stats", "")] + public Task GetStatsAsync( + GetStatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_sql/stats", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PostStats( + PostData body, + PostStatsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_sql/stats", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql/stats https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.post_stats", "body")] + public Task PostStatsAsync( + PostData body, + PostStatsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_sql/stats", + ctx, + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_sql https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Query( + PostData body, + QueryRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest(POST, "_plugins/_sql", body, RequestParams(requestParameters)); + + /// POST on /_plugins/_sql https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.query", "body")] + public Task QueryAsync( + PostData body, + QueryRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_sql", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_query/settings https://opensearch.org/docs/latest/search-plugins/sql/settings/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Settings( + PostData body, + SettingsRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + "_plugins/_query/settings", + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_query/settings https://opensearch.org/docs/latest/search-plugins/sql/settings/ + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.settings", "body")] + public Task SettingsAsync( + PostData body, + SettingsRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + "_plugins/_query/settings", + ctx, + body, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Transforms.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Transforms.cs new file mode 100644 index 0000000000..827be763fa --- /dev/null +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Transforms.cs @@ -0,0 +1,328 @@ +/* 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.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net; +using static OpenSearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace OpenSearch.Net.Specification.TransformsApi +{ + /// + /// Transforms APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelTransformsNamespace : NamespacedClientProxy + { + internal LowLevelTransformsNamespace(OpenSearchLowLevelClient client) + : base(client) { } + + /// DELETE on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#delete-a-transform-job + /// Transform to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Delete( + string id, + DeleteRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + DELETE, + Url($"_plugins/_transform/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// DELETE on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#delete-a-transform-job + /// Transform to delete. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.delete", "id")] + public Task DeleteAsync( + string id, + DeleteRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + DELETE, + Url($"_plugins/_transform/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform/{id}/_explain https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-the-status-of-a-transform-job + /// Transform to explain. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Explain( + string id, + ExplainRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_transform/{id:id}/_explain"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform/{id}/_explain https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-the-status-of-a-transform-job + /// Transform to explain. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.explain", "id")] + public Task ExplainAsync( + string id, + ExplainRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_transform/{id:id}/_explain"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + /// Transform to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Get(string id, GetRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + Url($"_plugins/_transform/{id:id}"), + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + /// Transform to access. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.get", "id")] + public Task GetAsync( + string id, + GetRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + Url($"_plugins/_transform/{id:id}"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/_preview https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Preview( + PostData body, + PreviewRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + "_plugins/_transform/_preview", + body, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/_preview https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.preview", "body")] + public Task PreviewAsync( + PostData body, + PreviewRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + "_plugins/_transform/_preview", + ctx, + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#create-a-transform-job + /// Transform to create/update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Put( + string id, + PostData body, + PutRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + PUT, + Url($"_plugins/_transform/{id:id}"), + body, + RequestParams(requestParameters) + ); + + /// PUT on /_plugins/_transform/{id} https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#create-a-transform-job + /// Transform to create/update. + /// + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.put", "id, body")] + public Task PutAsync( + string id, + PostData body, + PutRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + PUT, + Url($"_plugins/_transform/{id:id}"), + ctx, + body, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Search(SearchRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + GET, + "_plugins/_transform", + null, + RequestParams(requestParameters) + ); + + /// GET on /_plugins/_transform https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.search", "")] + public Task SearchAsync( + SearchRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + GET, + "_plugins/_transform", + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/{id}/_start https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#start-a-transform-job + /// Transform to start. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Start( + string id, + StartRequestParameters requestParameters = null + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_transform/{id:id}/_start"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/{id}/_start https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#start-a-transform-job + /// Transform to start. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.start", "id")] + public Task StartAsync( + string id, + StartRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_transform/{id:id}/_start"), + ctx, + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/{id}/_stop https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job + /// Transform to stop. + /// Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse Stop(string id, StopRequestParameters requestParameters = null) + where TResponse : class, IOpenSearchResponse, new() => + DoRequest( + POST, + Url($"_plugins/_transform/{id:id}/_stop"), + null, + RequestParams(requestParameters) + ); + + /// POST on /_plugins/_transform/{id}/_stop https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job + /// Transform to stop. + /// Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("transforms.stop", "id")] + public Task StopAsync( + string id, + StopRequestParameters requestParameters = null, + CancellationToken ctx = default + ) + where TResponse : class, IOpenSearchResponse, new() => + DoRequestAsync( + POST, + Url($"_plugins/_transform/{id:id}/_stop"), + ctx, + null, + RequestParams(requestParameters) + ); + } +} diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.cs index 88f8924560..a71e2481c1 100644 --- a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.cs +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.cs @@ -50,15 +50,30 @@ using System.Threading; using System.Threading.Tasks; using OpenSearch.Net; +using OpenSearch.Net.Specification.AsynchronousSearchApi; using OpenSearch.Net.Specification.CatApi; using OpenSearch.Net.Specification.ClusterApi; using OpenSearch.Net.Specification.DanglingIndicesApi; +using OpenSearch.Net.Specification.FlowFrameworkApi; using OpenSearch.Net.Specification.HttpApi; using OpenSearch.Net.Specification.IndicesApi; using OpenSearch.Net.Specification.IngestApi; +using OpenSearch.Net.Specification.IsmApi; +using OpenSearch.Net.Specification.KnnApi; +using OpenSearch.Net.Specification.MlApi; using OpenSearch.Net.Specification.NodesApi; +using OpenSearch.Net.Specification.NotificationsApi; +using OpenSearch.Net.Specification.ObservabilityApi; +using OpenSearch.Net.Specification.PplApi; +using OpenSearch.Net.Specification.QueryApi; +using OpenSearch.Net.Specification.RemoteStoreApi; +using OpenSearch.Net.Specification.RollupsApi; +using OpenSearch.Net.Specification.SearchPipelineApi; +using OpenSearch.Net.Specification.SecurityApi; using OpenSearch.Net.Specification.SnapshotApi; +using OpenSearch.Net.Specification.SqlApi; using OpenSearch.Net.Specification.TasksApi; +using OpenSearch.Net.Specification.TransformsApi; using static OpenSearch.Net.HttpMethod; // ReSharper disable InterpolatedStringExpressionIsNotIFormattable @@ -70,27 +85,57 @@ namespace OpenSearch.Net /// public partial class OpenSearchLowLevelClient : IOpenSearchLowLevelClient { + public LowLevelAsynchronousSearchNamespace AsynchronousSearch { get; private set; } public LowLevelCatNamespace Cat { get; private set; } public LowLevelClusterNamespace Cluster { get; private set; } public LowLevelDanglingIndicesNamespace DanglingIndices { get; private set; } + public LowLevelFlowFrameworkNamespace FlowFramework { get; private set; } public LowLevelIndicesNamespace Indices { get; private set; } public LowLevelIngestNamespace Ingest { get; private set; } + public LowLevelIsmNamespace Ism { get; private set; } + public LowLevelKnnNamespace Knn { get; private set; } + public LowLevelMlNamespace Ml { get; private set; } public LowLevelNodesNamespace Nodes { get; private set; } public LowLevelHttpNamespace Http { get; private set; } + public LowLevelNotificationsNamespace Notifications { get; private set; } + public LowLevelObservabilityNamespace Observability { get; private set; } + public LowLevelPplNamespace Ppl { get; private set; } + public LowLevelQueryNamespace Query { get; private set; } + public LowLevelRemoteStoreNamespace RemoteStore { get; private set; } + public LowLevelRollupsNamespace Rollups { get; private set; } + public LowLevelSearchPipelineNamespace SearchPipeline { get; private set; } + public LowLevelSecurityNamespace Security { get; private set; } public LowLevelSnapshotNamespace Snapshot { get; private set; } + public LowLevelSqlNamespace Sql { get; private set; } public LowLevelTasksNamespace Tasks { get; private set; } + public LowLevelTransformsNamespace Transforms { get; private set; } partial void SetupGeneratedNamespaces() { + AsynchronousSearch = new LowLevelAsynchronousSearchNamespace(this); Cat = new LowLevelCatNamespace(this); Cluster = new LowLevelClusterNamespace(this); DanglingIndices = new LowLevelDanglingIndicesNamespace(this); + FlowFramework = new LowLevelFlowFrameworkNamespace(this); Indices = new LowLevelIndicesNamespace(this); Ingest = new LowLevelIngestNamespace(this); + Ism = new LowLevelIsmNamespace(this); + Knn = new LowLevelKnnNamespace(this); + Ml = new LowLevelMlNamespace(this); Nodes = new LowLevelNodesNamespace(this); Http = new LowLevelHttpNamespace(this); + Notifications = new LowLevelNotificationsNamespace(this); + Observability = new LowLevelObservabilityNamespace(this); + Ppl = new LowLevelPplNamespace(this); + Query = new LowLevelQueryNamespace(this); + RemoteStore = new LowLevelRemoteStoreNamespace(this); + Rollups = new LowLevelRollupsNamespace(this); + SearchPipeline = new LowLevelSearchPipelineNamespace(this); + Security = new LowLevelSecurityNamespace(this); Snapshot = new LowLevelSnapshotNamespace(this); + Sql = new LowLevelSqlNamespace(this); Tasks = new LowLevelTasksNamespace(this); + Transforms = new LowLevelTransformsNamespace(this); } /// POST on /_bulk https://opensearch.org/docs/latest/api-reference/document-apis/bulk/ diff --git a/tests/Tests.YamlRunner/SkipList.fs b/tests/Tests.YamlRunner/SkipList.fs index 9fb2b8549b..e8de75a813 100644 --- a/tests/Tests.YamlRunner/SkipList.fs +++ b/tests/Tests.YamlRunner/SkipList.fs @@ -38,24 +38,11 @@ let SkipList = dict [ SkipFile "cat.indices/10_basic.yml", Section "Test cat indices output for closed index (pre 7.2.0)" SkipFile "cluster.health/10_basic.yml", Section "cluster health with closed index (pre 7.2.0)" - // TODO: Uses `indices.create_data_stream` which doesn't yet exist in the client - SkipFile "indices.delete_index_template/10_basic.yml", Section "Delete index template which is not used by data stream but index pattern matches" - - // Variations of `indices.put_alias` that accept index/alias in request body rather than path which are not supported by .NET client - // https://github.com/opensearch-project/opensearch-net/issues/718 - SkipFile "indices.put_alias/10_basic.yml", All - // .NET method arg typings make this not possible, index is a required parameter SkipFile "indices.put_mapping/all_path_options_with_types.yml", Section "put mapping with blank index" // argument is an enum in .NET client, meaning invalid value can't be passed SkipFile "indices.stats/10_index.yml", Section "Indices stats unrecognized parameter" - - // The client doesn't support the indices.upgrade API - SkipFile "indices.upgrade/10_basic.yml", All - - // TODO: Add support for search pipeline APIs - SkipFile "search_pipeline/10_basic.yml", All // TODO: Better support parsing and asserting unsigned longs (hitting long vs double precision issues) SkipFile "search.aggregation/20_terms.yml", Section "Unsigned Long test" From a44383863161c82552bf27a4f6b106c48bf5a817 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 24 Sep 2024 12:14:52 +1200 Subject: [PATCH 2/2] Enable search pipelines on 2.8.0 Signed-off-by: Thomas Farr --- .github/actions/run-released-opensearch/action.yml | 4 ++++ .github/actions/start-opensearch/action.yml | 8 ++++++-- .github/workflows/integration-yaml-tests.yml | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/actions/run-released-opensearch/action.yml b/.github/actions/run-released-opensearch/action.yml index 34f1227f6f..c8b8b45a99 100644 --- a/.github/actions/run-released-opensearch/action.yml +++ b/.github/actions/run-released-opensearch/action.yml @@ -7,6 +7,9 @@ inputs: secured: description: Whether to enable the security plugin required: true + opensearch_args: + description: Additional arguments to pass to the OpenSearch process + default: '' outputs: opensearch_url: description: The URL where the OpenSearch node is accessible @@ -49,4 +52,5 @@ runs: id: opensearch uses: ./client/.github/actions/start-opensearch with: + opensearch_args: ${{ inputs.opensearch_args }} secured: ${{ inputs.secured }} diff --git a/.github/actions/start-opensearch/action.yml b/.github/actions/start-opensearch/action.yml index 02dd2b613c..f2afd5783e 100644 --- a/.github/actions/start-opensearch/action.yml +++ b/.github/actions/start-opensearch/action.yml @@ -1,6 +1,9 @@ name: Start OpenSearch description: Configures and starts an OpenSearch daemon inputs: + opensearch_args: + description: Additional arguments to pass to the OpenSearch process + default: '' secured: description: Whether to enable the security plugin default: 'false' @@ -74,9 +77,9 @@ runs: fi if [[ "$RUNNER_OS" != "Windows" ]]; then - $OPENSEARCH_HOME/bin/opensearch & + $OPENSEARCH_HOME/bin/opensearch ${OPENSEARCH_ARGS} & else - $OPENSEARCH_HOME/bin/opensearch.bat -d & + $OPENSEARCH_HOME/bin/opensearch.bat ${OPENSEARCH_ARGS} -d & fi for attempt in {1..20}; do @@ -91,3 +94,4 @@ runs: env: SECURED: ${{ inputs.secured }} RUNNER_OS: ${{ runner.os }} + OPENSEARCH_ARGS: ${{ inputs.opensearch_args }} diff --git a/.github/workflows/integration-yaml-tests.yml b/.github/workflows/integration-yaml-tests.yml index 50654a0b80..034d2bdc7f 100644 --- a/.github/workflows/integration-yaml-tests.yml +++ b/.github/workflows/integration-yaml-tests.yml @@ -52,6 +52,7 @@ jobs: with: version: ${{ matrix.version }} secured: true + opensearch_args: ${{ matrix.version == '2.8.0' && '-Eopensearch.experimental.feature.search_pipeline.enabled=true' || '' }} - name: Run YAML tests working-directory: client