Skip to content

Commit 84f3f00

Browse files
committed
Add missing license headers
1 parent c1c3f88 commit 84f3f00

File tree

9 files changed

+46
-13
lines changed

9 files changed

+46
-13
lines changed

src/Nest/XPack/AsyncSearch/AsyncSearch.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
using System.Collections.Generic;
26
using System.Linq;
37
using System.Runtime.Serialization;

src/Nest/XPack/AsyncSearch/AsyncSearchResponseBase.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
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+
15
using System;
26
using System.Runtime.Serialization;
37
using Elasticsearch.Net.Utf8Json;
48

59
namespace Nest
610
{
711
[InterfaceDataContract]
8-
public interface IAsyncSearchResponse<TDocument> : IResponse where TDocument : class
12+
public interface IAsyncSearchResponse : IResponse
913
{
1014
[DataMember(Name = "id")]
1115
string Id { get; }
@@ -27,14 +31,11 @@ public interface IAsyncSearchResponse<TDocument> : IResponse where TDocument : c
2731

2832
[IgnoreDataMember]
2933
DateTimeOffset ExpirationTime { get; }
30-
31-
[DataMember(Name = "response")]
32-
AsyncSearch<TDocument> Response { get; }
3334
}
3435

3536
[DataContract]
36-
public abstract class AsyncSearchResponseBase<TDocument>
37-
: ResponseBase, IAsyncSearchResponse<TDocument> where TDocument: class
37+
public abstract class AsyncSearchResponseBase
38+
: ResponseBase, IAsyncSearchResponse
3839
{
3940
[DataMember(Name = "id")]
4041
public string Id { get; internal set; }
@@ -56,8 +57,5 @@ public abstract class AsyncSearchResponseBase<TDocument>
5657

5758
[IgnoreDataMember]
5859
public DateTimeOffset ExpirationTime => DateTimeUtil.UnixEpoch.AddMilliseconds(ExpirationTimeInMilliseconds);
59-
60-
[DataMember(Name = "response")]
61-
public AsyncSearch<TDocument> Response { get; internal set; }
6260
}
6361
}

src/Nest/XPack/AsyncSearch/Delete/AsyncSearchDeleteRequest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System.Collections.Generic;
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
24

35
namespace Nest
46
{

src/Nest/XPack/AsyncSearch/Delete/AsyncSearchDeleteResponse.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
namespace Nest
26
{
37
public class AsyncSearchDeleteResponse : AcknowledgedResponseBase { }

src/Nest/XPack/AsyncSearch/Get/AsyncSearchGetRequest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System.Collections.Generic;
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
24

35
namespace Nest
46
{
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
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+
17
namespace Nest
28
{
3-
public class AsyncSearchGetResponse<TDocument> : AsyncSearchResponseBase<TDocument> where TDocument : class { }
9+
public class AsyncSearchGetResponse<TDocument> : AsyncSearchResponseBase where TDocument : class
10+
{
11+
[DataMember(Name = "response")]
12+
public AsyncSearch<TDocument> Response { get; internal set; }
13+
}
414
}

src/Nest/XPack/AsyncSearch/Submit/AsyncSearchSubmitRequest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
using System;
26
using System.Collections.Generic;
37
using System.Runtime.Serialization;
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
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+
17
namespace Nest
28
{
3-
public class AsyncSearchSubmitResponse<TDocument> : AsyncSearchResponseBase<TDocument>
9+
public class AsyncSearchSubmitResponse<TDocument> : AsyncSearchResponseBase
410
where TDocument : class
511
{
12+
[DataMember(Name = "response")]
13+
public AsyncSearch<TDocument> Response { get; internal set; }
614
}
715
}

tests/Tests/XPack/AsyncSearch/AsyncSearchApiTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ [I] public async Task AsyncSearchGetResponse() => await Assert<AsyncSearchGetRes
107107
r.ShouldBeValid();
108108
r.Id.Should().NotBeNullOrEmpty();
109109
r.StartTime.Should().BeOnOrBefore(DateTimeOffset.Now);
110+
r.ExpirationTime.Should().BeOnOrBefore(DateTimeOffset.Now);
110111
r.Response.Should().NotBeNull();
111112
r.Response.Took.Should().BeGreaterOrEqualTo(0);
112113
r.Response.Hits.Should().HaveCount(10);

0 commit comments

Comments
 (0)