|
30 | 30 | // ReSharper disable RedundantNameQualifier |
31 | 31 | namespace Nest |
32 | 32 | { |
| 33 | + ///<summary>Descriptor for AddBlock <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-blocks.html</para></summary> |
| 34 | + public partial class AddIndexBlockDescriptor : RequestDescriptorBase<AddIndexBlockDescriptor, AddIndexBlockRequestParameters, IAddIndexBlockRequest>, IAddIndexBlockRequest |
| 35 | + { |
| 36 | + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAddBlock; |
| 37 | + ///<summary>/{index}/_block/{block}</summary> |
| 38 | + ///<param name = "index">this parameter is required</param> |
| 39 | + ///<param name = "block">this parameter is required</param> |
| 40 | + public AddIndexBlockDescriptor(Indices index, IndexBlock block): base(r => r.Required("index", index).Required("block", block)) |
| 41 | + { |
| 42 | + } |
| 43 | + |
| 44 | + ///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary> |
| 45 | + [SerializationConstructor] |
| 46 | + protected AddIndexBlockDescriptor(): base() |
| 47 | + { |
| 48 | + } |
| 49 | + |
| 50 | + // values part of the url path |
| 51 | + Indices IAddIndexBlockRequest.Index => Self.RouteValues.Get<Indices>("index"); |
| 52 | + IndexBlock IAddIndexBlockRequest.Block => Self.RouteValues.Get<IndexBlock>("block"); |
| 53 | + ///<summary>A comma separated list of indices to add a block to</summary> |
| 54 | + public AddIndexBlockDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); |
| 55 | + ///<summary>a shortcut into calling Index(typeof(TOther))</summary> |
| 56 | + public AddIndexBlockDescriptor Index<TOther>() |
| 57 | + where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); |
| 58 | + ///<summary>A shortcut into calling Index(Indices.All)</summary> |
| 59 | + public AddIndexBlockDescriptor AllIndices() => Index(Indices.All); |
| 60 | + // Request parameters |
| 61 | + ///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary> |
| 62 | + public AddIndexBlockDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); |
| 63 | + ///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary> |
| 64 | + public AddIndexBlockDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); |
| 65 | + ///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary> |
| 66 | + public AddIndexBlockDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); |
| 67 | + ///<summary>Specify timeout for connection to master</summary> |
| 68 | + public AddIndexBlockDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); |
| 69 | + ///<summary>Explicit operation timeout</summary> |
| 70 | + public AddIndexBlockDescriptor Timeout(Time timeout) => Qs("timeout", timeout); |
| 71 | + } |
| 72 | + |
33 | 73 | ///<summary>Descriptor for Analyze <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html</para></summary> |
34 | 74 | public partial class AnalyzeDescriptor : RequestDescriptorBase<AnalyzeDescriptor, AnalyzeRequestParameters, IAnalyzeRequest>, IAnalyzeRequest |
35 | 75 | { |
|
0 commit comments