/* 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);
}
}