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