/* 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.IngestApi;
// ReSharper disable once CheckNamespace
// ReSharper disable RedundantTypeArgumentsOfMethod
namespace OpenSearch.Client.Specification.IngestApi
{
///
/// Ingest APIs.
/// Not intended to be instantiated directly. Use the property
/// on .
///
///
public class IngestNamespace : NamespacedClientProxy
{
internal IngestNamespace(OpenSearchClient client): base(client)
{
}
///
/// DELETE request to the ingest.delete_pipeline API, read more about this API online:
///
///
///
public DeletePipelineResponse DeletePipeline(Id id, Func selector = null) => DeletePipeline(selector.InvokeOrDefault(new DeletePipelineDescriptor(id: id)));
///
/// DELETE request to the ingest.delete_pipeline API, read more about this API online:
///
///
///
public Task DeletePipelineAsync(Id id, Func selector = null, CancellationToken ct = default) => DeletePipelineAsync(selector.InvokeOrDefault(new DeletePipelineDescriptor(id: id)), ct);
///
/// DELETE request to the ingest.delete_pipeline API, read more about this API online:
///
///
///
public DeletePipelineResponse DeletePipeline(IDeletePipelineRequest request) => DoRequest(request, request.RequestParameters);
///
/// DELETE request to the ingest.delete_pipeline API, read more about this API online:
///
///
///
public Task DeletePipelineAsync(IDeletePipelineRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the ingest.get_pipeline API, read more about this API online:
///
///
///
public GetPipelineResponse GetPipeline(Func selector = null) => GetPipeline(selector.InvokeOrDefault(new GetPipelineDescriptor()));
///
/// GET request to the ingest.get_pipeline API, read more about this API online:
///
///
///
public Task GetPipelineAsync(Func selector = null, CancellationToken ct = default) => GetPipelineAsync(selector.InvokeOrDefault(new GetPipelineDescriptor()), ct);
///
/// GET request to the ingest.get_pipeline API, read more about this API online:
///
///
///
public GetPipelineResponse GetPipeline(IGetPipelineRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the ingest.get_pipeline API, read more about this API online:
///
///
///
public Task GetPipelineAsync(IGetPipelineRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// GET request to the ingest.processor_grok API, read more about this API online:
///
///
///
public GrokProcessorPatternsResponse GrokProcessorPatterns(Func selector = null) => GrokProcessorPatterns(selector.InvokeOrDefault(new GrokProcessorPatternsDescriptor()));
///
/// GET request to the ingest.processor_grok API, read more about this API online:
///
///
///
public Task GrokProcessorPatternsAsync(Func selector = null, CancellationToken ct = default) => GrokProcessorPatternsAsync(selector.InvokeOrDefault(new GrokProcessorPatternsDescriptor()), ct);
///
/// GET request to the ingest.processor_grok API, read more about this API online:
///
///
///
public GrokProcessorPatternsResponse GrokProcessorPatterns(IGrokProcessorPatternsRequest request) => DoRequest(request, request.RequestParameters);
///
/// GET request to the ingest.processor_grok API, read more about this API online:
///
///
///
public Task GrokProcessorPatternsAsync(IGrokProcessorPatternsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// PUT request to the ingest.put_pipeline API, read more about this API online:
///
///
///
public PutPipelineResponse PutPipeline(Id id, Func selector) => PutPipeline(selector.InvokeOrDefault(new PutPipelineDescriptor(id: id)));
///
/// PUT request to the ingest.put_pipeline API, read more about this API online:
///
///
///
public Task PutPipelineAsync(Id id, Func selector, CancellationToken ct = default) => PutPipelineAsync(selector.InvokeOrDefault(new PutPipelineDescriptor(id: id)), ct);
///
/// PUT request to the ingest.put_pipeline API, read more about this API online:
///
///
///
public PutPipelineResponse PutPipeline(IPutPipelineRequest request) => DoRequest(request, request.RequestParameters);
///
/// PUT request to the ingest.put_pipeline API, read more about this API online:
///
///
///
public Task PutPipelineAsync(IPutPipelineRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the ingest.simulate API, read more about this API online:
///
///
///
public SimulatePipelineResponse SimulatePipeline(Func selector = null) => SimulatePipeline(selector.InvokeOrDefault(new SimulatePipelineDescriptor()));
///
/// POST request to the ingest.simulate API, read more about this API online:
///
///
///
public Task SimulatePipelineAsync(Func selector = null, CancellationToken ct = default) => SimulatePipelineAsync(selector.InvokeOrDefault(new SimulatePipelineDescriptor()), ct);
///
/// POST request to the ingest.simulate API, read more about this API online:
///
///
///
public SimulatePipelineResponse SimulatePipeline(ISimulatePipelineRequest request) => DoRequest(request, request.RequestParameters);
///
/// POST request to the ingest.simulate API, read more about this API online:
///
///
///
public Task SimulatePipelineAsync(ISimulatePipelineRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
}
}