diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index 43d90c8470..e26d906491 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -42,6 +42,7 @@ public static class CodeConfiguration // e.g. new Glob("nodes.*"), new("dangling_indices.*"), new("ingest.*"), + new("snapshot.*"), new("tasks.*") }; diff --git a/src/ApiGenerator/Domain/Specification/ApiEndpoint.cs b/src/ApiGenerator/Domain/Specification/ApiEndpoint.cs index 541f3cfc65..d1ffdeb14b 100644 --- a/src/ApiGenerator/Domain/Specification/ApiEndpoint.cs +++ b/src/ApiGenerator/Domain/Specification/ApiEndpoint.cs @@ -103,17 +103,14 @@ public class ApiEndpoint HttpMethod = PreferredHttpMethod }; - public string PreferredHttpMethod - { - get + public string PreferredHttpMethod => + HttpMethods.OrderByDescending(m => m switch { - var first = HttpMethods.First(); - if (HttpMethods.Count > 1 && first.ToUpperInvariant() == "GET") - return HttpMethods.Last(); - - return first; - } - } + "GET" => 0, + "POST" => 1, + "PUT" or "DELETE" or "PATCH" or "HEAD" => 2, // Prefer "resource" methods over GET/POST methods + _ => -1 + }).First(); public string HighLevelMethodXmlDocDescription => $"{PreferredHttpMethod} request to the {Name} API, read more about this API online:"; diff --git a/src/ApiGenerator/Generator/Razor/HighLevelClientImplementationGenerator.cs b/src/ApiGenerator/Generator/Razor/HighLevelClientImplementationGenerator.cs index 362396187d..fe5a37ef96 100644 --- a/src/ApiGenerator/Generator/Razor/HighLevelClientImplementationGenerator.cs +++ b/src/ApiGenerator/Generator/Razor/HighLevelClientImplementationGenerator.cs @@ -44,7 +44,7 @@ public class HighLevelClientImplementationGenerator : RazorGeneratorBase public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token) { var view = ViewLocations.HighLevel("Client", "Implementation", "OpenSearchClient.cshtml"); - var target = GeneratorLocations.HighLevel($"OpenSearchClient.{CsharpNames.RootNamespace}.cs"); + var target = GeneratorLocations.HighLevel($"OpenSearchClient.cs"); await DoRazor(spec, view, target, token); string Target(string id) => GeneratorLocations.HighLevel($"OpenSearchClient.{id}.cs"); diff --git a/src/ApiGenerator/Generator/Razor/LowLevelClientImplementationGenerator.cs b/src/ApiGenerator/Generator/Razor/LowLevelClientImplementationGenerator.cs index f9a9038fc1..8136fa30f0 100644 --- a/src/ApiGenerator/Generator/Razor/LowLevelClientImplementationGenerator.cs +++ b/src/ApiGenerator/Generator/Razor/LowLevelClientImplementationGenerator.cs @@ -44,7 +44,7 @@ public class LowLevelClientImplementationGenerator : RazorGeneratorBase public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token) { var view = ViewLocations.LowLevel("Client", "Implementation", "OpenSearchLowLevelClient.cshtml"); - var target = GeneratorLocations.LowLevel($"OpenSearchLowLevelClient.{CsharpNames.RootNamespace}.cs"); + var target = GeneratorLocations.LowLevel("OpenSearchLowLevelClient.cs"); await DoRazor(spec, view, target, token); var namespaced = spec.EndpointsPerNamespaceLowLevel.Where(kv => kv.Key != CsharpNames.RootNamespace).ToList(); diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs index afb43a9b78..6ae591abcb 100644 --- a/src/OpenSearch.Client/ApiUrlsLookup.cs +++ b/src/OpenSearch.Client/ApiUrlsLookup.cs @@ -153,17 +153,6 @@ internal static partial class ApiUrlsLookups internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[]{"_search", "{index}/_search"}); internal static ApiUrls NoNamespaceSearchShards = new ApiUrls(new[]{"_search_shards", "{index}/_search_shards"}); internal static ApiUrls NoNamespaceSearchTemplate = new ApiUrls(new[]{"_search/template", "{index}/_search/template"}); - internal static ApiUrls SnapshotCleanupRepository = new ApiUrls(new[]{"_snapshot/{repository}/_cleanup"}); - internal static ApiUrls SnapshotClone = new ApiUrls(new[]{"_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"}); - internal static ApiUrls SnapshotSnapshot = new ApiUrls(new[]{"_snapshot/{repository}/{snapshot}"}); - internal static ApiUrls SnapshotCreateRepository = new ApiUrls(new[]{"_snapshot/{repository}"}); - internal static ApiUrls SnapshotDelete = new ApiUrls(new[]{"_snapshot/{repository}/{snapshot}"}); - internal static ApiUrls SnapshotDeleteRepository = new ApiUrls(new[]{"_snapshot/{repository}"}); - internal static ApiUrls SnapshotGet = new ApiUrls(new[]{"_snapshot/{repository}/{snapshot}"}); - internal static ApiUrls SnapshotGetRepository = new ApiUrls(new[]{"_snapshot", "_snapshot/{repository}"}); - internal static ApiUrls SnapshotRestore = new ApiUrls(new[]{"_snapshot/{repository}/{snapshot}/_restore"}); - internal static ApiUrls SnapshotStatus = new ApiUrls(new[]{"_snapshot/_status", "_snapshot/{repository}/_status", "_snapshot/{repository}/{snapshot}/_status"}); - internal static ApiUrls SnapshotVerifyRepository = new ApiUrls(new[]{"_snapshot/{repository}/_verify"}); internal static ApiUrls NoNamespaceTermVectors = new ApiUrls(new[]{"{index}/_termvectors/{id}", "{index}/_termvectors"}); internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[]{"{index}/_update/{id}"}); internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[]{"{index}/_update_by_query"}); diff --git a/src/OpenSearch.Client/Descriptors.Snapshot.cs b/src/OpenSearch.Client/Descriptors.Snapshot.cs deleted file mode 100644 index 3595358229..0000000000 --- a/src/OpenSearch.Client/Descriptors.Snapshot.cs +++ /dev/null @@ -1,402 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; -using OpenSearch.Net; -using OpenSearch.Net.Utf8Json; -using OpenSearch.Net.Specification.SnapshotApi; - -// ReSharper disable RedundantBaseConstructorCall -// ReSharper disable UnusedTypeParameter -// ReSharper disable PartialMethodWithSinglePart -// ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client.Specification.SnapshotApi -{ - ///Descriptor for CleanupRepository - public partial class CleanupRepositoryDescriptor : RequestDescriptorBase, ICleanupRepositoryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotCleanupRepository; - ////_snapshot/{repository}/_cleanup - ///this parameter is required - public CleanupRepositoryDescriptor(Name repository): base(r => r.Required("repository", repository)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected CleanupRepositoryDescriptor(): base() - { - } - - // values part of the url path - Name ICleanupRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CleanupRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CleanupRepositoryDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Explicit operation timeout - public CleanupRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - } - - ///Descriptor for Clone https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class CloneSnapshotDescriptor : RequestDescriptorBase, ICloneSnapshotRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotClone; - ////_snapshot/{repository}/{snapshot}/_clone/{target_snapshot} - ///this parameter is required - ///this parameter is required - ///this parameter is required - public CloneSnapshotDescriptor(Name repository, Name snapshot, Name targetSnapshot): base(r => r.Required("repository", repository).Required("snapshot", snapshot).Required("target_snapshot", targetSnapshot)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected CloneSnapshotDescriptor(): base() - { - } - - // values part of the url path - Name ICloneSnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); - Name ICloneSnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); - Name ICloneSnapshotRequest.TargetSnapshot => Self.RouteValues.Get("target_snapshot"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CloneSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CloneSnapshotDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - } - - ///Descriptor for Snapshot https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class SnapshotDescriptor : RequestDescriptorBase, ISnapshotRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotSnapshot; - ////_snapshot/{repository}/{snapshot} - ///this parameter is required - ///this parameter is required - public SnapshotDescriptor(Name repository, Name snapshot): base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected SnapshotDescriptor(): base() - { - } - - // values part of the url path - Name ISnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); - Name ISnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public SnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public SnapshotDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Should this request wait until the operation has completed before returning - public SnapshotDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); - } - - ///Descriptor for CreateRepository https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class CreateRepositoryDescriptor : RequestDescriptorBase, ICreateRepositoryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotCreateRepository; - ////_snapshot/{repository} - ///this parameter is required - public CreateRepositoryDescriptor(Name repository): base(r => r.Required("repository", repository)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected CreateRepositoryDescriptor(): base() - { - } - - // values part of the url path - Name ICreateRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CreateRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CreateRepositoryDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Explicit operation timeout - public CreateRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Whether to verify the repository after creation - public CreateRepositoryDescriptor Verify(bool? verify = true) => Qs("verify", verify); - } - - ///Descriptor for Delete https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class DeleteSnapshotDescriptor : RequestDescriptorBase, IDeleteSnapshotRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotDelete; - ////_snapshot/{repository}/{snapshot} - ///this parameter is required - ///this parameter is required - public DeleteSnapshotDescriptor(Name repository, Name snapshot): base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected DeleteSnapshotDescriptor(): base() - { - } - - // values part of the url path - Name IDeleteSnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); - Name IDeleteSnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public DeleteSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public DeleteSnapshotDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - } - - ///Descriptor for DeleteRepository https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class DeleteRepositoryDescriptor : RequestDescriptorBase, IDeleteRepositoryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotDeleteRepository; - ////_snapshot/{repository} - ///this parameter is required - public DeleteRepositoryDescriptor(Names repository): base(r => r.Required("repository", repository)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected DeleteRepositoryDescriptor(): base() - { - } - - // values part of the url path - Names IDeleteRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public DeleteRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public DeleteRepositoryDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Explicit operation timeout - public DeleteRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - } - - ///Descriptor for Get https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class GetSnapshotDescriptor : RequestDescriptorBase, IGetSnapshotRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGet; - ////_snapshot/{repository}/{snapshot} - ///this parameter is required - ///this parameter is required - public GetSnapshotDescriptor(Name repository, Names snapshot): base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected GetSnapshotDescriptor(): base() - { - } - - // values part of the url path - Name IGetSnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); - Names IGetSnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); - // Request parameters - ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - public GetSnapshotDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public GetSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public GetSnapshotDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Whether to show verbose snapshot info or only show the basic info found in the repository index blob - public GetSnapshotDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - } - - ///Descriptor for GetRepository https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class GetRepositoryDescriptor : RequestDescriptorBase, IGetRepositoryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGetRepository; - ////_snapshot - public GetRepositoryDescriptor(): base() - { - } - - ////_snapshot/{repository} - ///Optional, accepts null - public GetRepositoryDescriptor(Names repository): base(r => r.Optional("repository", repository)) - { - } - - // values part of the url path - Names IGetRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - ///A comma-separated list of repository names - public GetRepositoryDescriptor RepositoryName(Names repository) => Assign(repository, (a, v) => a.RouteValues.Optional("repository", v)); - // Request parameters - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public GetRepositoryDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public GetRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public GetRepositoryDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - } - - ///Descriptor for Restore https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class RestoreDescriptor : RequestDescriptorBase, IRestoreRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotRestore; - ////_snapshot/{repository}/{snapshot}/_restore - ///this parameter is required - ///this parameter is required - public RestoreDescriptor(Name repository, Name snapshot): base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected RestoreDescriptor(): base() - { - } - - // values part of the url path - Name IRestoreRequest.RepositoryName => Self.RouteValues.Get("repository"); - Name IRestoreRequest.Snapshot => Self.RouteValues.Get("snapshot"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public RestoreDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public RestoreDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Should this request wait until the operation has completed before returning - public RestoreDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); - } - - ///Descriptor for Status https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class SnapshotStatusDescriptor : RequestDescriptorBase, ISnapshotStatusRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotStatus; - ////_snapshot/_status - public SnapshotStatusDescriptor(): base() - { - } - - ////_snapshot/{repository}/_status - ///Optional, accepts null - public SnapshotStatusDescriptor(Name repository): base(r => r.Optional("repository", repository)) - { - } - - ////_snapshot/{repository}/{snapshot}/_status - ///Optional, accepts null - ///Optional, accepts null - public SnapshotStatusDescriptor(Name repository, Names snapshot): base(r => r.Optional("repository", repository).Optional("snapshot", snapshot)) - { - } - - // values part of the url path - Name ISnapshotStatusRequest.RepositoryName => Self.RouteValues.Get("repository"); - Names ISnapshotStatusRequest.Snapshot => Self.RouteValues.Get("snapshot"); - ///A repository name - public SnapshotStatusDescriptor RepositoryName(Name repository) => Assign(repository, (a, v) => a.RouteValues.Optional("repository", v)); - ///A comma-separated list of snapshot names - public SnapshotStatusDescriptor Snapshot(Names snapshot) => Assign(snapshot, (a, v) => a.RouteValues.Optional("snapshot", v)); - // Request parameters - ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - public SnapshotStatusDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public SnapshotStatusDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public SnapshotStatusDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - } - - ///Descriptor for VerifyRepository https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class VerifyRepositoryDescriptor : RequestDescriptorBase, IVerifyRepositoryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotVerifyRepository; - ////_snapshot/{repository}/_verify - ///this parameter is required - public VerifyRepositoryDescriptor(Name repository): base(r => r.Required("repository", repository)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected VerifyRepositoryDescriptor(): base() - { - } - - // values part of the url path - Name IVerifyRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public VerifyRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public VerifyRepositoryDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Explicit operation timeout - public VerifyRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - } -} diff --git a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs index 1234094d32..fa3da95db4 100644 --- a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs +++ b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs @@ -1024,11 +1024,5 @@ Task UpdateByQueryAsync(Funchttps://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/ /// Task UpdateByQueryRethrottleAsync(IUpdateByQueryRethrottleRequest request, CancellationToken ct = default); - - ///Snapshot APIs - SnapshotNamespace Snapshot - { - get; - } } } diff --git a/src/OpenSearch.Client/OpenSearch.Client.csproj b/src/OpenSearch.Client/OpenSearch.Client.csproj index 7db27cba3c..a338eb97a6 100644 --- a/src/OpenSearch.Client/OpenSearch.Client.csproj +++ b/src/OpenSearch.Client/OpenSearch.Client.csproj @@ -49,5 +49,9 @@ True OpenSearchClient.cs + + True + OpenSearchClient.cs + diff --git a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs index 3bd6f6800d..777c72111a 100644 --- a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs +++ b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs @@ -91,20 +91,12 @@ public NodesNamespace Nodes private set; } - ///Snapshot APIs - public SnapshotNamespace Snapshot - { - get; - private set; - } - partial void SetupNamespaces() { Cat = new CatNamespace(this); Cluster = new ClusterNamespace(this); Indices = new IndicesNamespace(this); Nodes = new NodesNamespace(this); - Snapshot = new SnapshotNamespace(this); } /// diff --git a/src/OpenSearch.Client/OpenSearchClient.Snapshot.cs b/src/OpenSearch.Client/OpenSearchClient.Snapshot.cs deleted file mode 100644 index 5468062cc8..0000000000 --- a/src/OpenSearch.Client/OpenSearchClient.Snapshot.cs +++ /dev/null @@ -1,331 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Threading; -using System.Threading.Tasks; -using OpenSearch.Net.Specification.SnapshotApi; - -// ReSharper disable once CheckNamespace -// ReSharper disable RedundantTypeArgumentsOfMethod -namespace OpenSearch.Client.Specification.SnapshotApi -{ - /// - /// Snapshot APIs. - /// Not intended to be instantiated directly. Use the property - /// on . - /// - /// - public class SnapshotNamespace : NamespacedClientProxy - { - internal SnapshotNamespace(OpenSearchClient client): base(client) - { - } - - /// - /// POST request to the snapshot.cleanup_repository API, read more about this API online: - /// - /// - /// - public CleanupRepositoryResponse CleanupRepository(Name repository, Func selector = null) => CleanupRepository(selector.InvokeOrDefault(new CleanupRepositoryDescriptor(repository: repository))); - /// - /// POST request to the snapshot.cleanup_repository API, read more about this API online: - /// - /// - /// - public Task CleanupRepositoryAsync(Name repository, Func selector = null, CancellationToken ct = default) => CleanupRepositoryAsync(selector.InvokeOrDefault(new CleanupRepositoryDescriptor(repository: repository)), ct); - /// - /// POST request to the snapshot.cleanup_repository API, read more about this API online: - /// - /// - /// - public CleanupRepositoryResponse CleanupRepository(ICleanupRepositoryRequest request) => DoRequest(request, request.RequestParameters); - /// - /// POST request to the snapshot.cleanup_repository API, read more about this API online: - /// - /// - /// - public Task CleanupRepositoryAsync(ICleanupRepositoryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// PUT request to the snapshot.clone API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CloneSnapshotResponse Clone(Name repository, Name snapshot, Name targetSnapshot, Func selector) => Clone(selector.InvokeOrDefault(new CloneSnapshotDescriptor(repository: repository, snapshot: snapshot, targetSnapshot: targetSnapshot))); - /// - /// PUT request to the snapshot.clone API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task CloneAsync(Name repository, Name snapshot, Name targetSnapshot, Func selector, CancellationToken ct = default) => CloneAsync(selector.InvokeOrDefault(new CloneSnapshotDescriptor(repository: repository, snapshot: snapshot, targetSnapshot: targetSnapshot)), ct); - /// - /// PUT request to the snapshot.clone API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CloneSnapshotResponse Clone(ICloneSnapshotRequest request) => DoRequest(request, request.RequestParameters); - /// - /// PUT request to the snapshot.clone API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task CloneAsync(ICloneSnapshotRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// PUT request to the snapshot.create API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public SnapshotResponse Snapshot(Name repository, Name snapshot, Func selector = null) => Snapshot(selector.InvokeOrDefault(new SnapshotDescriptor(repository: repository, snapshot: snapshot))); - /// - /// PUT request to the snapshot.create API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task SnapshotAsync(Name repository, Name snapshot, Func selector = null, CancellationToken ct = default) => SnapshotAsync(selector.InvokeOrDefault(new SnapshotDescriptor(repository: repository, snapshot: snapshot)), ct); - /// - /// PUT request to the snapshot.create API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public SnapshotResponse Snapshot(ISnapshotRequest request) => DoRequest(request, request.RequestParameters); - /// - /// PUT request to the snapshot.create API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task SnapshotAsync(ISnapshotRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// PUT request to the snapshot.create_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CreateRepositoryResponse CreateRepository(Name repository, Func selector) => CreateRepository(selector.InvokeOrDefault(new CreateRepositoryDescriptor(repository: repository))); - /// - /// PUT request to the snapshot.create_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task CreateRepositoryAsync(Name repository, Func selector, CancellationToken ct = default) => CreateRepositoryAsync(selector.InvokeOrDefault(new CreateRepositoryDescriptor(repository: repository)), ct); - /// - /// PUT request to the snapshot.create_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CreateRepositoryResponse CreateRepository(ICreateRepositoryRequest request) => DoRequest(request, request.RequestParameters); - /// - /// PUT request to the snapshot.create_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task CreateRepositoryAsync(ICreateRepositoryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// DELETE request to the snapshot.delete API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public DeleteSnapshotResponse Delete(Name repository, Name snapshot, Func selector = null) => Delete(selector.InvokeOrDefault(new DeleteSnapshotDescriptor(repository: repository, snapshot: snapshot))); - /// - /// DELETE request to the snapshot.delete API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task DeleteAsync(Name repository, Name snapshot, Func selector = null, CancellationToken ct = default) => DeleteAsync(selector.InvokeOrDefault(new DeleteSnapshotDescriptor(repository: repository, snapshot: snapshot)), ct); - /// - /// DELETE request to the snapshot.delete API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public DeleteSnapshotResponse Delete(IDeleteSnapshotRequest request) => DoRequest(request, request.RequestParameters); - /// - /// DELETE request to the snapshot.delete API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task DeleteAsync(IDeleteSnapshotRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// DELETE request to the snapshot.delete_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public DeleteRepositoryResponse DeleteRepository(Names repository, Func selector = null) => DeleteRepository(selector.InvokeOrDefault(new DeleteRepositoryDescriptor(repository: repository))); - /// - /// DELETE request to the snapshot.delete_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task DeleteRepositoryAsync(Names repository, Func selector = null, CancellationToken ct = default) => DeleteRepositoryAsync(selector.InvokeOrDefault(new DeleteRepositoryDescriptor(repository: repository)), ct); - /// - /// DELETE request to the snapshot.delete_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public DeleteRepositoryResponse DeleteRepository(IDeleteRepositoryRequest request) => DoRequest(request, request.RequestParameters); - /// - /// DELETE request to the snapshot.delete_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task DeleteRepositoryAsync(IDeleteRepositoryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// GET request to the snapshot.get API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public GetSnapshotResponse Get(Name repository, Names snapshot, Func selector = null) => Get(selector.InvokeOrDefault(new GetSnapshotDescriptor(repository: repository, snapshot: snapshot))); - /// - /// GET request to the snapshot.get API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task GetAsync(Name repository, Names snapshot, Func selector = null, CancellationToken ct = default) => GetAsync(selector.InvokeOrDefault(new GetSnapshotDescriptor(repository: repository, snapshot: snapshot)), ct); - /// - /// GET request to the snapshot.get API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public GetSnapshotResponse Get(IGetSnapshotRequest request) => DoRequest(request, request.RequestParameters); - /// - /// GET request to the snapshot.get API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task GetAsync(IGetSnapshotRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// GET request to the snapshot.get_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public GetRepositoryResponse GetRepository(Func selector = null) => GetRepository(selector.InvokeOrDefault(new GetRepositoryDescriptor())); - /// - /// GET request to the snapshot.get_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task GetRepositoryAsync(Func selector = null, CancellationToken ct = default) => GetRepositoryAsync(selector.InvokeOrDefault(new GetRepositoryDescriptor()), ct); - /// - /// GET request to the snapshot.get_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public GetRepositoryResponse GetRepository(IGetRepositoryRequest request) => DoRequest(request, request.RequestParameters); - /// - /// GET request to the snapshot.get_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task GetRepositoryAsync(IGetRepositoryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// POST request to the snapshot.restore API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public RestoreResponse Restore(Name repository, Name snapshot, Func selector = null) => Restore(selector.InvokeOrDefault(new RestoreDescriptor(repository: repository, snapshot: snapshot))); - /// - /// POST request to the snapshot.restore API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task RestoreAsync(Name repository, Name snapshot, Func selector = null, CancellationToken ct = default) => RestoreAsync(selector.InvokeOrDefault(new RestoreDescriptor(repository: repository, snapshot: snapshot)), ct); - /// - /// POST request to the snapshot.restore API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public RestoreResponse Restore(IRestoreRequest request) => DoRequest(request, request.RequestParameters); - /// - /// POST request to the snapshot.restore API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task RestoreAsync(IRestoreRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// GET request to the snapshot.status API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public SnapshotStatusResponse Status(Func selector = null) => Status(selector.InvokeOrDefault(new SnapshotStatusDescriptor())); - /// - /// GET request to the snapshot.status API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task StatusAsync(Func selector = null, CancellationToken ct = default) => StatusAsync(selector.InvokeOrDefault(new SnapshotStatusDescriptor()), ct); - /// - /// GET request to the snapshot.status API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public SnapshotStatusResponse Status(ISnapshotStatusRequest request) => DoRequest(request, request.RequestParameters); - /// - /// GET request to the snapshot.status API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task StatusAsync(ISnapshotStatusRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - /// - /// POST request to the snapshot.verify_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public VerifyRepositoryResponse VerifyRepository(Name repository, Func selector = null) => VerifyRepository(selector.InvokeOrDefault(new VerifyRepositoryDescriptor(repository: repository))); - /// - /// POST request to the snapshot.verify_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task VerifyRepositoryAsync(Name repository, Func selector = null, CancellationToken ct = default) => VerifyRepositoryAsync(selector.InvokeOrDefault(new VerifyRepositoryDescriptor(repository: repository)), ct); - /// - /// POST request to the snapshot.verify_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public VerifyRepositoryResponse VerifyRepository(IVerifyRepositoryRequest request) => DoRequest(request, request.RequestParameters); - /// - /// POST request to the snapshot.verify_repository API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task VerifyRepositoryAsync(IVerifyRepositoryRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); - } -} diff --git a/src/OpenSearch.Client/Requests.Snapshot.cs b/src/OpenSearch.Client/Requests.Snapshot.cs deleted file mode 100644 index dd20ec50b5..0000000000 --- a/src/OpenSearch.Client/Requests.Snapshot.cs +++ /dev/null @@ -1,731 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; -using System.Runtime.Serialization; -using OpenSearch.Net; -using OpenSearch.Net.Utf8Json; -using OpenSearch.Net.Specification.SnapshotApi; - -// ReSharper disable RedundantBaseConstructorCall -// ReSharper disable UnusedTypeParameter -// ReSharper disable PartialMethodWithSinglePart -// ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client.Specification.SnapshotApi -{ - [InterfaceDataContract] - public partial interface ICleanupRepositoryRequest : IRequest - { - [IgnoreDataMember] - Name RepositoryName - { - get; - } - } - - ///Request for CleanupRepository - public partial class CleanupRepositoryRequest : PlainRequestBase, ICleanupRepositoryRequest - { - protected ICleanupRepositoryRequest Self => this; - internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotCleanupRepository; - ////_snapshot/{repository}/_cleanup - ///this parameter is required - public CleanupRepositoryRequest(Name repository): base(r => r.Required("repository", repository)) - { - } - - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected CleanupRepositoryRequest(): base() - { - } - - // values part of the url path - [IgnoreDataMember] - Name ICleanupRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - // Request parameters - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public Time MasterTimeout - { - get => Q