|
| 1 | +using System; |
| 2 | +using System.Threading.Tasks; |
| 3 | +using System.Collections.Generic; |
| 4 | +using System.Linq; |
| 5 | +using System.Text; |
| 6 | + |
| 7 | +namespace Elasticsearch.Net |
| 8 | +{ |
| 9 | +#pragma warning disable 0618 |
| 10 | + using IndicesRecoveryStatusSelector = Func<IndicesRecoveryRequestParameters, IndicesRecoveryRequestParameters>; |
| 11 | +#pragma warning restore 0618 |
| 12 | + |
| 13 | + [Obsolete("Scheduled to be removed in 2.0, renamed to TypeExistsRequestParameters")] |
| 14 | + public class IndicesRecoveryRequestParameters : RecoveryStatusRequestParameters { } |
| 15 | + |
| 16 | + public static class IndicesRecoveryStatusClientExtensions |
| 17 | + { |
| 18 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 19 | + public static ElasticsearchResponse<T> IndicesRecoveryForAll<T>(this IElasticsearchClient client, IndicesRecoveryStatusSelector requestParameters = null) |
| 20 | + { |
| 21 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 22 | + return client.IndicesRecoveryForAll<T>(selector); |
| 23 | + } |
| 24 | + |
| 25 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 26 | + public static Task<ElasticsearchResponse<T>> IndicesRecoveryForAllAsync<T>(this IElasticsearchClient client, IndicesRecoveryStatusSelector requestParameters = null) |
| 27 | + { |
| 28 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 29 | + return client.IndicesRecoveryForAllAsync<T>(selector); |
| 30 | + |
| 31 | + } |
| 32 | + |
| 33 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 34 | + public static ElasticsearchResponse<DynamicDictionary> IndicesRecoveryForAll(this IElasticsearchClient client, IndicesRecoveryStatusSelector requestParameters = null) |
| 35 | + { |
| 36 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 37 | + return client.IndicesRecoveryForAll(selector); |
| 38 | + |
| 39 | + } |
| 40 | + |
| 41 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 42 | + public static Task<ElasticsearchResponse<DynamicDictionary>> IndicesRecoveryForAllAsync(this IElasticsearchClient client, IndicesRecoveryStatusSelector requestParameters = null) |
| 43 | + { |
| 44 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 45 | + return client.IndicesRecoveryForAllAsync(selector); |
| 46 | + } |
| 47 | + |
| 48 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 49 | + public static ElasticsearchResponse<T> IndicesRecovery<T>(this IElasticsearchClient client, string index, IndicesRecoveryStatusSelector requestParameters = null) |
| 50 | + { |
| 51 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 52 | + return client.IndicesRecovery<T>(index, selector); |
| 53 | + } |
| 54 | + |
| 55 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 56 | + public static Task<ElasticsearchResponse<T>> IndicesRecoveryAsync<T>(this IElasticsearchClient client, string index, IndicesRecoveryStatusSelector requestParameters = null) |
| 57 | + { |
| 58 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 59 | + return client.IndicesRecoveryAsync<T>(index, selector); |
| 60 | + } |
| 61 | + |
| 62 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 63 | + public static ElasticsearchResponse<DynamicDictionary> IndicesRecovery(this IElasticsearchClient client, string index, IndicesRecoveryStatusSelector requestParameters = null) |
| 64 | + { |
| 65 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 66 | + return client.IndicesRecovery(index, selector); |
| 67 | + } |
| 68 | + |
| 69 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of RecoveryStatusRequestParameters")] |
| 70 | + public static Task<ElasticsearchResponse<DynamicDictionary>> IndicesRecoveryAsync(this IElasticsearchClient client, string index, IndicesRecoveryStatusSelector requestParameters = null) |
| 71 | + { |
| 72 | + var selector = Obsolete.UpCastSelector<IndicesRecoveryRequestParameters, RecoveryStatusRequestParameters>(requestParameters); |
| 73 | + return client.IndicesRecoveryAsync(index, selector); |
| 74 | + } |
| 75 | + } |
| 76 | +} |
0 commit comments