Skip to content

Commit 5d38238

Browse files
[codegen] 7.13 synchronization (#5710)
Co-authored-by: Mpdreamz <[email protected]>
1 parent b75eda3 commit 5d38238

File tree

3 files changed

+163
-0
lines changed

3 files changed

+163
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"snapshot.repository_analyze":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
5+
"description":"Analyzes a repository for correctness and performance"
6+
},
7+
"stability":"stable",
8+
"visibility":"public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url":{
15+
"paths":[
16+
{
17+
"path":"/_snapshot/{repository}/_analyze",
18+
"methods":[
19+
"POST"
20+
],
21+
"parts":{
22+
"repository":{
23+
"type":"string",
24+
"description":"A repository name"
25+
}
26+
}
27+
}
28+
]
29+
},
30+
"params":{
31+
"blob_count":{
32+
"type":"number",
33+
"description":"Number of blobs to create during the test. Defaults to 100."
34+
},
35+
"concurrency":{
36+
"type":"number",
37+
"description":"Number of operations to run concurrently during the test. Defaults to 10."
38+
},
39+
"read_node_count":{
40+
"type":"number",
41+
"description":"Number of nodes on which to read a blob after writing. Defaults to 10."
42+
},
43+
"early_read_node_count":{
44+
"type":"number",
45+
"description":"Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2."
46+
},
47+
"seed":{
48+
"type":"number",
49+
"description":"Seed for the random number generator used to create the test workload. Defaults to a random value."
50+
},
51+
"rare_action_probability":{
52+
"type":"number",
53+
"description":"Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02."
54+
},
55+
"max_blob_size":{
56+
"type":"string",
57+
"description":"Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'."
58+
},
59+
"max_total_data_size":{
60+
"type":"string",
61+
"description":"Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'."
62+
},
63+
"timeout":{
64+
"type":"time",
65+
"description":"Explicit operation timeout. Defaults to '30s'."
66+
},
67+
"detailed":{
68+
"type":"boolean",
69+
"description":"Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned."
70+
}
71+
}
72+
}
73+
}

src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,85 @@ public TimeSpan MasterTimeout
194194
}
195195
}
196196

197+
///<summary>Request options for RepositoryAnalyze <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
198+
public class RepositoryAnalyzeRequestParameters : RequestParameters<RepositoryAnalyzeRequestParameters>
199+
{
200+
public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
201+
public override bool SupportsBody => false;
202+
///<summary>Number of blobs to create during the test. Defaults to 100.</summary>
203+
public long? BlobCount
204+
{
205+
get => Q<long? >("blob_count");
206+
set => Q("blob_count", value);
207+
}
208+
209+
///<summary>Number of operations to run concurrently during the test. Defaults to 10.</summary>
210+
public long? Concurrency
211+
{
212+
get => Q<long? >("concurrency");
213+
set => Q("concurrency", value);
214+
}
215+
216+
///<summary>Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned.</summary>
217+
public bool? Detailed
218+
{
219+
get => Q<bool? >("detailed");
220+
set => Q("detailed", value);
221+
}
222+
223+
///<summary>
224+
/// Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the
225+
/// 'rare_action_probability' parameter is also relevant. Defaults to 2.
226+
///</summary>
227+
public long? EarlyReadNodeCount
228+
{
229+
get => Q<long? >("early_read_node_count");
230+
set => Q("early_read_node_count", value);
231+
}
232+
233+
///<summary>Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'.</summary>
234+
public string MaxBlobSize
235+
{
236+
get => Q<string>("max_blob_size");
237+
set => Q("max_blob_size", value);
238+
}
239+
240+
///<summary>Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.</summary>
241+
public string MaxTotalDataSize
242+
{
243+
get => Q<string>("max_total_data_size");
244+
set => Q("max_total_data_size", value);
245+
}
246+
247+
///<summary>Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.</summary>
248+
public long? RareActionProbability
249+
{
250+
get => Q<long? >("rare_action_probability");
251+
set => Q("rare_action_probability", value);
252+
}
253+
254+
///<summary>Number of nodes on which to read a blob after writing. Defaults to 10.</summary>
255+
public long? ReadNodeCount
256+
{
257+
get => Q<long? >("read_node_count");
258+
set => Q("read_node_count", value);
259+
}
260+
261+
///<summary>Seed for the random number generator used to create the test workload. Defaults to a random value.</summary>
262+
public long? Seed
263+
{
264+
get => Q<long? >("seed");
265+
set => Q("seed", value);
266+
}
267+
268+
///<summary>Explicit operation timeout. Defaults to '30s'.</summary>
269+
public TimeSpan Timeout
270+
{
271+
get => Q<TimeSpan>("timeout");
272+
set => Q("timeout", value);
273+
}
274+
}
275+
197276
///<summary>Request options for Restore <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
198277
public class RestoreRequestParameters : RequestParameters<RestoreRequestParameters>
199278
{

src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ public TResponse GetRepository<TResponse>(string repository, GetRepositoryReques
161161
[MapsApi("snapshot.get_repository", "repository")]
162162
public Task<TResponse> GetRepositoryAsync<TResponse>(string repository, GetRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default)
163163
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}"), ctx, null, RequestParams(requestParameters));
164+
///<summary>POST on /_snapshot/{repository}/_analyze <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
165+
///<param name = "repository">A repository name</param>
166+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
167+
public TResponse RepositoryAnalyze<TResponse>(string repository, RepositoryAnalyzeRequestParameters requestParameters = null)
168+
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_snapshot/{repository:repository}/_analyze"), null, RequestParams(requestParameters));
169+
///<summary>POST on /_snapshot/{repository}/_analyze <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
170+
///<param name = "repository">A repository name</param>
171+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
172+
[MapsApi("snapshot.repository_analyze", "repository")]
173+
public Task<TResponse> RepositoryAnalyzeAsync<TResponse>(string repository, RepositoryAnalyzeRequestParameters requestParameters = null, CancellationToken ctx = default)
174+
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_snapshot/{repository:repository}/_analyze"), ctx, null, RequestParams(requestParameters));
164175
///<summary>POST on /_snapshot/{repository}/{snapshot}/_restore <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
165176
///<param name = "repository">A repository name</param>
166177
///<param name = "snapshot">A snapshot name</param>

0 commit comments

Comments
 (0)