Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ApiGenerator/last_downloaded_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6be4acd5094954851a956dd93d8c4043979011d9
fb84b6710d5ee62c00f51cd041d7318691195fc3
51 changes: 51 additions & 0 deletions src/Nest/Descriptors.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ public partial class ClearScrollDescriptor : RequestDescriptorBase<ClearScrollDe
// Request parameters
}

///<summary>Descriptor for ClosePointInTime <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</para></summary>
public partial class ClosePointInTimeDescriptor : RequestDescriptorBase<ClosePointInTimeDescriptor, ClosePointInTimeRequestParameters, IClosePointInTimeRequest>, IClosePointInTimeRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClosePointInTime;
// values part of the url path
// Request parameters
}

///<summary>Descriptor for Count <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html</para></summary>
public partial class CountDescriptor<TDocument> : RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>, ICountRequest<TDocument>
{
Expand Down Expand Up @@ -1093,6 +1101,49 @@ public MultiTermVectorsDescriptor Fields<T>(params Expression<Func<T, object>>[]
public MultiTermVectorsDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
}

///<summary>Descriptor for OpenPointInTime <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</para></summary>
public partial class OpenPointInTimeDescriptor : RequestDescriptorBase<OpenPointInTimeDescriptor, OpenPointInTimeRequestParameters, IOpenPointInTimeRequest>, IOpenPointInTimeRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceOpenPointInTime;
///<summary>/_pit</summary>
public OpenPointInTimeDescriptor(): base()
{
}

///<summary>/{index}/_pit</summary>
///<param name = "index">Optional, accepts null</param>
public OpenPointInTimeDescriptor(Indices index): base(r => r.Optional("index", index))
{
}

// values part of the url path
Indices IOpenPointInTimeRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names to open point in time; use the special string `_all` or Indices.All to perform the operation on all indices</summary>
public OpenPointInTimeDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public OpenPointInTimeDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public OpenPointInTimeDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public OpenPointInTimeDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public OpenPointInTimeDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specific the time to live for the point in time</summary>
public OpenPointInTimeDescriptor KeepAlive(string keepalive) => Qs("keep_alive", keepalive);
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public OpenPointInTimeDescriptor Preference(string preference) => Qs("preference", preference);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public OpenPointInTimeDescriptor Routing(Routing routing) => Qs("routing", routing);
}

///<summary>Descriptor for Ping <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html</para></summary>
public partial class PingDescriptor : RequestDescriptorBase<PingDescriptor, PingRequestParameters, IPingRequest>, IPingRequest
{
Expand Down
48 changes: 48 additions & 0 deletions src/Nest/ElasticClient.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,30 @@ partial void SetupNamespaces()
/// </summary>
public Task<ClearScrollResponse> ClearScrollAsync(IClearScrollRequest request, CancellationToken ct = default) => DoRequestAsync<IClearScrollRequest, ClearScrollResponse>(request, request.RequestParameters, ct);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public ClosePointInTimeResponse ClosePointInTime(Func<ClosePointInTimeDescriptor, IClosePointInTimeRequest> selector = null) => ClosePointInTime(selector.InvokeOrDefault(new ClosePointInTimeDescriptor()));
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public Task<ClosePointInTimeResponse> ClosePointInTimeAsync(Func<ClosePointInTimeDescriptor, IClosePointInTimeRequest> selector = null, CancellationToken ct = default) => ClosePointInTimeAsync(selector.InvokeOrDefault(new ClosePointInTimeDescriptor()), ct);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public ClosePointInTimeResponse ClosePointInTime(IClosePointInTimeRequest request) => DoRequest<IClosePointInTimeRequest, ClosePointInTimeResponse>(request, request.RequestParameters);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public Task<ClosePointInTimeResponse> ClosePointInTimeAsync(IClosePointInTimeRequest request, CancellationToken ct = default) => DoRequestAsync<IClosePointInTimeRequest, ClosePointInTimeResponse>(request, request.RequestParameters, ct);
/// <summary>
/// <c>POST</c> request to the <c>count</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html</a>
Expand Down Expand Up @@ -774,6 +798,30 @@ public Task<IndexResponse> IndexAsync<TDocument>(IIndexRequest<TDocument> reques
/// </summary>
public Task<MultiTermVectorsResponse> MultiTermVectorsAsync(IMultiTermVectorsRequest request, CancellationToken ct = default) => DoRequestAsync<IMultiTermVectorsRequest, MultiTermVectorsResponse>(request, request.RequestParameters, ct);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public OpenPointInTimeResponse OpenPointInTime(Indices index = null, Func<OpenPointInTimeDescriptor, IOpenPointInTimeRequest> selector = null) => OpenPointInTime(selector.InvokeOrDefault(new OpenPointInTimeDescriptor().Index(index: index)));
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public Task<OpenPointInTimeResponse> OpenPointInTimeAsync(Indices index = null, Func<OpenPointInTimeDescriptor, IOpenPointInTimeRequest> selector = null, CancellationToken ct = default) => OpenPointInTimeAsync(selector.InvokeOrDefault(new OpenPointInTimeDescriptor().Index(index: index)), ct);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public OpenPointInTimeResponse OpenPointInTime(IOpenPointInTimeRequest request) => DoRequest<IOpenPointInTimeRequest, OpenPointInTimeResponse>(request, request.RequestParameters);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
public Task<OpenPointInTimeResponse> OpenPointInTimeAsync(IOpenPointInTimeRequest request, CancellationToken ct = default) => DoRequestAsync<IOpenPointInTimeRequest, OpenPointInTimeResponse>(request, request.RequestParameters, ct);
/// <summary>
/// <c>HEAD</c> request to the <c>ping</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html</a>
Expand Down
48 changes: 48 additions & 0 deletions src/Nest/IElasticClient.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,30 @@ NodesNamespace Nodes
/// </summary>
Task<ClearScrollResponse> ClearScrollAsync(IClearScrollRequest request, CancellationToken ct = default);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
ClosePointInTimeResponse ClosePointInTime(Func<ClosePointInTimeDescriptor, IClosePointInTimeRequest> selector = null);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
Task<ClosePointInTimeResponse> ClosePointInTimeAsync(Func<ClosePointInTimeDescriptor, IClosePointInTimeRequest> selector = null, CancellationToken ct = default);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
ClosePointInTimeResponse ClosePointInTime(IClosePointInTimeRequest request);
/// <summary>
/// <c>DELETE</c> request to the <c>close_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
Task<ClosePointInTimeResponse> ClosePointInTimeAsync(IClosePointInTimeRequest request, CancellationToken ct = default);
/// <summary>
/// <c>POST</c> request to the <c>count</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html</a>
Expand Down Expand Up @@ -671,6 +695,30 @@ Task<IndexResponse> IndexAsync<TDocument>(IIndexRequest<TDocument> request, Canc
/// </summary>
Task<MultiTermVectorsResponse> MultiTermVectorsAsync(IMultiTermVectorsRequest request, CancellationToken ct = default);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
OpenPointInTimeResponse OpenPointInTime(Indices index = null, Func<OpenPointInTimeDescriptor, IOpenPointInTimeRequest> selector = null);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
Task<OpenPointInTimeResponse> OpenPointInTimeAsync(Indices index = null, Func<OpenPointInTimeDescriptor, IOpenPointInTimeRequest> selector = null, CancellationToken ct = default);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
OpenPointInTimeResponse OpenPointInTime(IOpenPointInTimeRequest request);
/// <summary>
/// <c>POST</c> request to the <c>open_point_in_time</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</a>
/// </summary>
Task<OpenPointInTimeResponse> OpenPointInTimeAsync(IOpenPointInTimeRequest request, CancellationToken ct = default);
/// <summary>
/// <c>HEAD</c> request to the <c>ping</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html">https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html</a>
Expand Down
87 changes: 87 additions & 0 deletions src/Nest/Requests.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ public partial class ClearScrollRequest : PlainRequestBase<ClearScrollRequestPar
// Request parameters
}

[InterfaceDataContract]
public partial interface IClosePointInTimeRequest : IRequest<ClosePointInTimeRequestParameters>
{
}

///<summary>Request for ClosePointInTime <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</para></summary>
public partial class ClosePointInTimeRequest : PlainRequestBase<ClosePointInTimeRequestParameters>, IClosePointInTimeRequest
{
protected IClosePointInTimeRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClosePointInTime;
// values part of the url path
// Request parameters
}

[InterfaceDataContract]
public partial interface ICountRequest : IRequest<CountRequestParameters>
{
Expand Down Expand Up @@ -2336,6 +2350,79 @@ public VersionType? VersionType
}
}

[InterfaceDataContract]
public partial interface IOpenPointInTimeRequest : IRequest<OpenPointInTimeRequestParameters>
{
[IgnoreDataMember]
Indices Index
{
get;
}
}

///<summary>Request for OpenPointInTime <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</para></summary>
public partial class OpenPointInTimeRequest : PlainRequestBase<OpenPointInTimeRequestParameters>, IOpenPointInTimeRequest
{
protected IOpenPointInTimeRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceOpenPointInTime;
///<summary>/_pit</summary>
public OpenPointInTimeRequest(): base()
{
}

///<summary>/{index}/_pit</summary>
///<param name = "index">Optional, accepts null</param>
public OpenPointInTimeRequest(Indices index): base(r => r.Optional("index", index))
{
}

// values part of the url path
[IgnoreDataMember]
Indices IOpenPointInTimeRequest.Index => Self.RouteValues.Get<Indices>("index");
// Request parameters
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ExpandWildcards? ExpandWildcards
{
get => Q<ExpandWildcards? >("expand_wildcards");
set => Q("expand_wildcards", value);
}

///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public bool? IgnoreUnavailable
{
get => Q<bool? >("ignore_unavailable");
set => Q("ignore_unavailable", value);
}

///<summary>Specific the time to live for the point in time</summary>
public string KeepAlive
{
get => Q<string>("keep_alive");
set => Q("keep_alive", value);
}

///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public string Preference
{
get => Q<string>("preference");
set => Q("preference", value);
}

///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"
////></para>
///</summary>
public Routing Routing
{
get => Q<Routing>("routing");
set => Q("routing", value);
}
}

[InterfaceDataContract]
public partial interface IPingRequest : IRequest<PingRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using System.Runtime.Serialization;

namespace Nest
{
[MapsApi("close_point_in_time.json")]
public partial interface IClosePointInTimeRequest
{
/// <summary>
/// The ID of the point in time to close.
/// </summary>
[DataMember(Name = "id")]
string Id { get; set; }
}

/// <inheritdoc cref="ClosePointInTimeRequest" />
public partial class ClosePointInTimeRequest
{
/// <inheritdoc />
public string Id { get; set; }
}

public partial class ClosePointInTimeDescriptor
{
string IClosePointInTimeRequest.Id { get; set; }

/// <inheritdoc cref="IClosePointInTimeRequest.Id" />
public ClosePointInTimeDescriptor Id(string id) => Assign(id, (a, v) => a.Id = v);
}
}
Loading