Skip to content

Commit 0ea5281

Browse files
committed
Add types for response deserialisation
1 parent 277fb28 commit 0ea5281

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
using System.Runtime.Serialization;
6+
7+
namespace Elasticsearch.Net
8+
{
9+
/// <summary>
10+
/// Information about the build version.
11+
/// </summary>
12+
internal class BuildVersion
13+
{
14+
/// <summary>
15+
/// The SemVer version number, which may include pre-release labels.
16+
/// </summary>
17+
[DataMember(Name = "number")]
18+
public string Number { get; set; }
19+
20+
/// <summary>
21+
/// The flavor of the build.
22+
/// </summary>
23+
[DataMember(Name = "build_flavor")]
24+
public string BuildFlavor { get; set; }
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
using System.Runtime.Serialization;
6+
7+
namespace Elasticsearch.Net
8+
{
9+
/// <summary>
10+
/// Represents the response from a call to the root path of an Elasticsearch server.
11+
/// </summary>
12+
internal class RootResponse : ElasticsearchResponseBase
13+
{
14+
/// <summary>
15+
/// The build version information of the product.
16+
/// </summary>
17+
[DataMember(Name = "version")]
18+
public BuildVersion Version { get; set; }
19+
20+
/// <summary>
21+
/// The tagline of the product.
22+
/// </summary>
23+
[DataMember(Name = "tagline")]
24+
public string Tagline { get; set; }
25+
}
26+
}

0 commit comments

Comments
 (0)