forked from elastic/elasticsearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElasticLowLevelClient.Snapshot.cs
204 lines (202 loc) · 21.4 KB
/
ElasticLowLevelClient.Snapshot.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//
// 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.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Elasticsearch.Net;
using static Elasticsearch.Net.HttpMethod;
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable once CheckNamespace
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable RedundantExtendsListEntry
namespace Elasticsearch.Net.Specification.SnapshotApi
{
///<summary>
/// Snapshot APIs.
/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Snapshot"/> property
/// on <see cref = "IElasticLowLevelClient"/>.
///</para>
///</summary>
public class LowLevelSnapshotNamespace : NamespacedClientProxy
{
internal LowLevelSnapshotNamespace(ElasticLowLevelClient client): base(client)
{
}
///<summary>POST on /_snapshot/{repository}/_cleanup <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "body"></param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse CleanupRepository<TResponse>(string repository, PostData body, CleanupRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_snapshot/{repository:repository}/_cleanup"), body, RequestParams(requestParameters));
///<summary>POST on /_snapshot/{repository}/_cleanup <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "body"></param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.cleanup_repository", "repository, body")]
public Task<TResponse> CleanupRepositoryAsync<TResponse>(string repository, PostData body, CleanupRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_snapshot/{repository:repository}/_cleanup"), ctx, body, RequestParams(requestParameters));
///<summary>PUT on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "body">The snapshot definition</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Snapshot<TResponse>(string repository, string snapshot, PostData body, SnapshotRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(PUT, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), body, RequestParams(requestParameters));
///<summary>PUT on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "body">The snapshot definition</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.create", "repository, snapshot, body")]
public Task<TResponse> SnapshotAsync<TResponse>(string repository, string snapshot, PostData body, SnapshotRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, body, RequestParams(requestParameters));
///<summary>PUT on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "body">The repository definition</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse CreateRepository<TResponse>(string repository, PostData body, CreateRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(PUT, Url($"_snapshot/{repository:repository}"), body, RequestParams(requestParameters));
///<summary>PUT on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "body">The repository definition</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.create_repository", "repository, body")]
public Task<TResponse> CreateRepositoryAsync<TResponse>(string repository, PostData body, CreateRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_snapshot/{repository:repository}"), ctx, body, RequestParams(requestParameters));
///<summary>DELETE on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Delete<TResponse>(string repository, string snapshot, DeleteSnapshotRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(DELETE, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), null, RequestParams(requestParameters));
///<summary>DELETE on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.delete", "repository, snapshot")]
public Task<TResponse> DeleteAsync<TResponse>(string repository, string snapshot, DeleteSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters));
///<summary>DELETE on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A comma-separated list of repository names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse DeleteRepository<TResponse>(string repository, DeleteRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(DELETE, Url($"_snapshot/{repository:repository}"), null, RequestParams(requestParameters));
///<summary>DELETE on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A comma-separated list of repository names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.delete_repository", "repository")]
public Task<TResponse> DeleteRepositoryAsync<TResponse>(string repository, DeleteRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_snapshot/{repository:repository}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A comma-separated list of snapshot names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Get<TResponse>(string repository, string snapshot, GetSnapshotRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/{snapshot} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A comma-separated list of snapshot names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.get", "repository, snapshot")]
public Task<TResponse> GetAsync<TResponse>(string repository, string snapshot, GetSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_snapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse GetRepository<TResponse>(GetRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_snapshot", null, RequestParams(requestParameters));
///<summary>GET on /_snapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.get_repository", "")]
public Task<TResponse> GetRepositoryAsync<TResponse>(GetRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_snapshot", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A comma-separated list of repository names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse GetRepository<TResponse>(string repository, GetRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_snapshot/{repository:repository}"), null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A comma-separated list of repository names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.get_repository", "repository")]
public Task<TResponse> GetRepositoryAsync<TResponse>(string repository, GetRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}"), ctx, null, RequestParams(requestParameters));
///<summary>POST on /_snapshot/{repository}/{snapshot}/_restore <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "body">Details of what to restore</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Restore<TResponse>(string repository, string snapshot, PostData body, RestoreRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_restore"), body, RequestParams(requestParameters));
///<summary>POST on /_snapshot/{repository}/{snapshot}/_restore <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A snapshot name</param>
///<param name = "body">Details of what to restore</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.restore", "repository, snapshot, body")]
public Task<TResponse> RestoreAsync<TResponse>(string repository, string snapshot, PostData body, RestoreRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_restore"), ctx, body, RequestParams(requestParameters));
///<summary>GET on /_snapshot/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Status<TResponse>(SnapshotStatusRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_snapshot/_status", null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.status", "")]
public Task<TResponse> StatusAsync<TResponse>(SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_snapshot/_status", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Status<TResponse>(string repository, SnapshotStatusRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_snapshot/{repository:repository}/_status"), null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.status", "repository")]
public Task<TResponse> StatusAsync<TResponse>(string repository, SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}/_status"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/{snapshot}/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A comma-separated list of snapshot names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Status<TResponse>(string repository, string snapshot, SnapshotStatusRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_status"), null, RequestParams(requestParameters));
///<summary>GET on /_snapshot/{repository}/{snapshot}/_status <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "snapshot">A comma-separated list of snapshot names</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.status", "repository, snapshot")]
public Task<TResponse> StatusAsync<TResponse>(string repository, string snapshot, SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_status"), ctx, null, RequestParams(requestParameters));
///<summary>POST on /_snapshot/{repository}/_verify <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse VerifyRepository<TResponse>(string repository, VerifyRepositoryRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_snapshot/{repository:repository}/_verify"), null, RequestParams(requestParameters));
///<summary>POST on /_snapshot/{repository}/_verify <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
///<param name = "repository">A repository name</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("snapshot.verify_repository", "repository")]
public Task<TResponse> VerifyRepositoryAsync<TResponse>(string repository, VerifyRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_snapshot/{repository:repository}/_verify"), ctx, null, RequestParams(requestParameters));
}
}