Skip to content

Commit 5766d38

Browse files
committed
Merge branch 'feature/get-repository' into develop
2 parents cc7405b + 6cd995a commit 5766d38

23 files changed

+703
-73
lines changed

src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5378,12 +5378,12 @@ public GetSnapshotRequestParameters MasterTimeout(string master_timeout)
53785378
///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html
53795379
///</pre>
53805380
///</summary>
5381-
public class SnapshotGetRepositoryRequestParameters : FluentRequestParameters<SnapshotGetRepositoryRequestParameters>
5381+
public class GetRepositoryRequestParameters : FluentRequestParameters<GetRepositoryRequestParameters>
53825382
{
53835383

53845384
internal string _master_timeout { get; set; }
53855385
///<summary>Explicit operation timeout for connection to master node</summary>
5386-
public SnapshotGetRepositoryRequestParameters MasterTimeout(string master_timeout)
5386+
public GetRepositoryRequestParameters MasterTimeout(string master_timeout)
53875387
{
53885388
this._master_timeout = master_timeout;
53895389
this.AddQueryString("master_timeout", this._master_timeout);
@@ -5393,7 +5393,7 @@ public SnapshotGetRepositoryRequestParameters MasterTimeout(string master_timeou
53935393

53945394
internal bool _local { get; set; }
53955395
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
5396-
public SnapshotGetRepositoryRequestParameters Local(bool local)
5396+
public GetRepositoryRequestParameters Local(bool local)
53975397
{
53985398
this._local = local;
53995399
this.AddQueryString("local", this._local);

src/Elasticsearch.Net/ElasticsearchClient.Generated.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34343,14 +34343,14 @@ public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetAsync(string re
3434334343
///<para> - If T is of type byte[] deserialization will be shortcircuited</para>
3434434344
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
3434534345
///</returns>
34346-
public ElasticsearchResponse<T> SnapshotGetRepository<T>(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34346+
public ElasticsearchResponse<T> SnapshotGetRepository<T>(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3434734347
{
3434834348
var url = "_snapshot";
3434934349
IRequestParameters requestParams = null;
3435034350

3435134351
if (requestParameters != null)
3435234352
{
34353-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34353+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3435434354
}
3435534355

3435634356

@@ -34375,14 +34375,14 @@ public ElasticsearchResponse<T> SnapshotGetRepository<T>(Func<SnapshotGetReposit
3437534375
///<para> - If T is of type byte[] deserialization will be shortcircuited</para>
3437634376
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
3437734377
///</returns>
34378-
public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34378+
public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3437934379
{
3438034380
var url = "_snapshot";
3438134381
IRequestParameters requestParams = null;
3438234382

3438334383
if (requestParameters != null)
3438434384
{
34385-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34385+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3438634386
}
3438734387

3438834388

@@ -34409,14 +34409,14 @@ public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(Func<Snapsho
3440934409
///<para> - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]</para>
3441034410
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
3441134411
///</returns>
34412-
public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34412+
public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3441334413
{
3441434414
var url = "_snapshot";
3441534415
IRequestParameters requestParams = null;
3441634416

3441734417
if (requestParameters != null)
3441834418
{
34419-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34419+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3442034420
}
3442134421

3442234422

@@ -34443,14 +34443,14 @@ public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(Func<Snaps
3444334443
///<para> - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]</para>
3444434444
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
3444534445
///</returns>
34446-
public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34446+
public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3444734447
{
3444834448
var url = "_snapshot";
3444934449
IRequestParameters requestParams = null;
3445034450

3445134451
if (requestParameters != null)
3445234452
{
34453-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34453+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3445434454
}
3445534455

3445634456

@@ -34476,15 +34476,15 @@ public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync
3447634476
///<para> - If T is of type byte[] deserialization will be shortcircuited</para>
3447734477
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
3447834478
///</returns>
34479-
public ElasticsearchResponse<T> SnapshotGetRepository<T>(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34479+
public ElasticsearchResponse<T> SnapshotGetRepository<T>(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3448034480
{
3448134481
repository.ThrowIfNullOrEmpty("repository");
3448234482
var url = "_snapshot/{0}".F(Encoded(repository));
3448334483
IRequestParameters requestParams = null;
3448434484

3448534485
if (requestParameters != null)
3448634486
{
34487-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34487+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3448834488
}
3448934489

3449034490

@@ -34510,15 +34510,15 @@ public ElasticsearchResponse<T> SnapshotGetRepository<T>(string repository, Func
3451034510
///<para> - If T is of type byte[] deserialization will be shortcircuited</para>
3451134511
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
3451234512
///</returns>
34513-
public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34513+
public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3451434514
{
3451534515
repository.ThrowIfNullOrEmpty("repository");
3451634516
var url = "_snapshot/{0}".F(Encoded(repository));
3451734517
IRequestParameters requestParams = null;
3451834518

3451934519
if (requestParameters != null)
3452034520
{
34521-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34521+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3452234522
}
3452334523

3452434524

@@ -34546,15 +34546,15 @@ public Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(string repos
3454634546
///<para> - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]</para>
3454734547
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
3454834548
///</returns>
34549-
public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34549+
public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3455034550
{
3455134551
repository.ThrowIfNullOrEmpty("repository");
3455234552
var url = "_snapshot/{0}".F(Encoded(repository));
3455334553
IRequestParameters requestParams = null;
3455434554

3455534555
if (requestParameters != null)
3455634556
{
34557-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34557+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3455834558
}
3455934559

3456034560

@@ -34582,15 +34582,15 @@ public ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(string rep
3458234582
///<para> - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]</para>
3458334583
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
3458434584
///</returns>
34585-
public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null)
34585+
public Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null)
3458634586
{
3458734587
repository.ThrowIfNullOrEmpty("repository");
3458834588
var url = "_snapshot/{0}".F(Encoded(repository));
3458934589
IRequestParameters requestParams = null;
3459034590

3459134591
if (requestParameters != null)
3459234592
{
34593-
requestParams = requestParameters(new SnapshotGetRepositoryRequestParameters());
34593+
requestParams = requestParameters(new GetRepositoryRequestParameters());
3459434594
}
3459534595

3459634596

src/Elasticsearch.Net/IElasticsearchClient.Generated.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18431,7 +18431,7 @@ public interface IElasticsearchClient
1843118431
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
1843218432
///</returns>
1843318433

18434-
ElasticsearchResponse<T> SnapshotGetRepository<T>(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18434+
ElasticsearchResponse<T> SnapshotGetRepository<T>(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1843518435

1843618436
///<summary>Represents a GET on /_snapshot
1843718437
///<para></para>Returns: A task that'll return an ElasticsearchResponse&lt;T&gt; holding the reponse body deserialized as T.
@@ -18448,7 +18448,7 @@ public interface IElasticsearchClient
1844818448
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
1844918449
///</returns>
1845018450

18451-
Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18451+
Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1845218452

1845318453
///<summary>Represents a GET on /_snapshot
1845418454
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; holding the response body deserialized as DynamicDictionary
@@ -18467,7 +18467,7 @@ public interface IElasticsearchClient
1846718467
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
1846818468
///</returns>
1846918469

18470-
ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18470+
ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1847118471

1847218472
///<summary>Represents a GET on /_snapshot
1847318473
///<para></para>Returns: Task that'll return an ElasticsearchResponse&lt;T$gt; holding the response body deserialized as DynamicDictionary
@@ -18486,7 +18486,7 @@ public interface IElasticsearchClient
1848618486
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
1848718487
///</returns>
1848818488

18489-
Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18489+
Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1849018490

1849118491
///<summary>Represents a GET on /_snapshot/{repository}
1849218492
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; holding the reponse body deserialized as T.
@@ -18504,7 +18504,7 @@ public interface IElasticsearchClient
1850418504
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
1850518505
///</returns>
1850618506

18507-
ElasticsearchResponse<T> SnapshotGetRepository<T>(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18507+
ElasticsearchResponse<T> SnapshotGetRepository<T>(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1850818508

1850918509
///<summary>Represents a GET on /_snapshot/{repository}
1851018510
///<para></para>Returns: A task that'll return an ElasticsearchResponse&lt;T&gt; holding the reponse body deserialized as T.
@@ -18522,7 +18522,7 @@ public interface IElasticsearchClient
1852218522
///<para> - If T is of type VoidResponse the response stream will be ignored completely</para>
1852318523
///</returns>
1852418524

18525-
Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18525+
Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1852618526

1852718527
///<summary>Represents a GET on /_snapshot/{repository}
1852818528
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; holding the response body deserialized as DynamicDictionary
@@ -18542,7 +18542,7 @@ public interface IElasticsearchClient
1854218542
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
1854318543
///</returns>
1854418544

18545-
ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18545+
ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1854618546

1854718547
///<summary>Represents a GET on /_snapshot/{repository}
1854818548
///<para></para>Returns: Task that'll return an ElasticsearchResponse&lt;T$gt; holding the response body deserialized as DynamicDictionary
@@ -18562,7 +18562,7 @@ public interface IElasticsearchClient
1856218562
///<para> - can be safely dispatched to a nullable type even if intermediate properties do not exist</para>
1856318563
///</returns>
1856418564

18565-
Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(string repository, Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters> requestParameters = null);
18565+
Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(string repository, Func<GetRepositoryRequestParameters, GetRepositoryRequestParameters> requestParameters = null);
1856618566

1856718567
///<summary>Represents a POST on /_snapshot/{repository}/{snapshot}/_restore
1856818568
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; holding the reponse body deserialized as T.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 SnapshotGetRepositorySelector = Func<SnapshotGetRepositoryRequestParameters, SnapshotGetRepositoryRequestParameters>;
11+
#pragma warning restore 0618
12+
13+
[Obsolete("Scheduled to be removed in 2.0, renamed to GetRepositoryRequestParameters ")]
14+
public class SnapshotGetRepositoryRequestParameters : GetRepositoryRequestParameters { }
15+
16+
public static class SnapshotGetRepositoryClientExtensions
17+
{
18+
19+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
20+
public static ElasticsearchResponse<T> SnapshotGetRepository<T>(this IElasticsearchClient client, SnapshotGetRepositorySelector requestParameters = null)
21+
{
22+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
23+
return client.SnapshotGetRepository<T>(selector);
24+
}
25+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
26+
public static Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(this IElasticsearchClient client, SnapshotGetRepositorySelector requestParameters = null)
27+
{
28+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
29+
return client.SnapshotGetRepositoryAsync<T>(selector);
30+
}
31+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
32+
public static ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(this IElasticsearchClient client, SnapshotGetRepositorySelector requestParameters = null)
33+
{
34+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
35+
return client.SnapshotGetRepository(selector);
36+
}
37+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
38+
public static Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(this IElasticsearchClient client, SnapshotGetRepositorySelector requestParameters = null)
39+
{
40+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
41+
return client.SnapshotGetRepositoryAsync(selector);
42+
}
43+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
44+
public static ElasticsearchResponse<T> SnapshotGetRepository<T>(this IElasticsearchClient client, string repository, SnapshotGetRepositorySelector requestParameters = null)
45+
{
46+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
47+
return client.SnapshotGetRepository<T>(repository, selector);
48+
}
49+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
50+
public static Task<ElasticsearchResponse<T>> SnapshotGetRepositoryAsync<T>(this IElasticsearchClient client, string repository, SnapshotGetRepositorySelector requestParameters = null)
51+
{
52+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
53+
return client.SnapshotGetRepositoryAsync<T>(repository, selector);
54+
}
55+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
56+
public static ElasticsearchResponse<DynamicDictionary> SnapshotGetRepository(this IElasticsearchClient client, string repository, SnapshotGetRepositorySelector requestParameters = null)
57+
{
58+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
59+
return client.SnapshotGetRepository(repository, selector);
60+
}
61+
[Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of GetRepositoryRequestParameters ")]
62+
public static Task<ElasticsearchResponse<DynamicDictionary>> SnapshotGetRepositoryAsync(this IElasticsearchClient client, string repository, SnapshotGetRepositorySelector requestParameters = null)
63+
{
64+
var selector = Obsolete.UpCastSelector<SnapshotGetRepositoryRequestParameters, GetRepositoryRequestParameters>(requestParameters);
65+
return client.SnapshotGetRepositoryAsync(repository, selector);
66+
}
67+
68+
}
69+
}

0 commit comments

Comments
 (0)