|
1 | | -using System; |
| 1 | +using System.Collections.Generic; |
2 | 2 | using Newtonsoft.Json; |
3 | 3 |
|
4 | 4 | namespace Nest |
5 | 5 | { |
| 6 | + /// <summary> |
| 7 | + /// This API creates a new named collection of auto-follow patterns against the remote cluster specified |
| 8 | + /// in the request body. Newly created indices on the remote cluster matching any of the specified patterns |
| 9 | + /// will be automatically configured as follower indices. |
| 10 | + /// </summary> |
6 | 11 | [MapsApi("ccr.put_auto_follow_pattern.json")] |
7 | 12 | [ContractJsonConverter(typeof(ReadAsTypeJsonConverter<CreateAutoFollowPatternRequest>))] |
8 | | - public partial interface ICreateAutoFollowPatternRequest |
9 | | - { |
10 | | - /// <summary> |
11 | | - /// |
12 | | - /// <para> |
13 | | - /// </para> |
14 | | - /// </summary> |
15 | | - [JsonProperty("cursor")] |
16 | | - string Cursor { get; set; } |
17 | | - } |
| 13 | + public partial interface ICreateAutoFollowPatternRequest : IAutoFollowPattern { } |
18 | 14 |
|
| 15 | + /// <inheritdoc cref="ICreateAutoFollowPatternRequest"/> |
19 | 16 | public partial class CreateAutoFollowPatternRequest |
20 | 17 | { |
21 | | - /// <inheritdoc cref="ICreateAutoFollowPatternRequest.Cursor" /> |
22 | | - public string Cursor { get; set; } |
| 18 | + /// <inheritdoc cref="IAutoFollowPattern.RemoteCluster"/> |
| 19 | + public string RemoteCluster { get; set; } |
| 20 | + /// <inheritdoc cref="IAutoFollowPattern.LeaderIndexPatterns"/> |
| 21 | + public IEnumerable<string> LeaderIndexPatterns { get; set; } |
| 22 | + /// <inheritdoc cref="IAutoFollowPattern.FollowIndexPattern"/> |
| 23 | + public string FollowIndexPattern { get; set; } |
| 24 | + /// <inheritdoc cref="IAutoFollowPattern.MaxReadRequestOperationCount"/> |
| 25 | + public int? MaxReadRequestOperationCount { get; set; } |
| 26 | + /// <inheritdoc cref="IAutoFollowPattern.MaxOutstandingReadRequests"/> |
| 27 | + public long? MaxOutstandingReadRequests { get; set; } |
| 28 | + /// <inheritdoc cref="IAutoFollowPattern.MaxReadRequestSize"/> |
| 29 | + public string MaxReadRequestSize { get; set; } |
| 30 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteRequestOperationCount"/> |
| 31 | + public int? MaxWriteRequestOperationCount { get; set; } |
| 32 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteRequestSize"/> |
| 33 | + public string MaxWriteRequestSize { get; set; } |
| 34 | + /// <inheritdoc cref="IAutoFollowPattern.MaxOutstandingWriteRequests"/> |
| 35 | + public int? MaxOutstandingWriteRequests { get; set; } |
| 36 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteBufferCount"/> |
| 37 | + public int? MaxWriteBufferCount { get; set; } |
| 38 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteBufferSize"/> |
| 39 | + public string MaxWriteBufferSize { get; set; } |
| 40 | + /// <inheritdoc cref="IAutoFollowPattern.MaxRetryDelay"/> |
| 41 | + public Time MaxRetryDelay { get; set; } |
| 42 | + /// <inheritdoc cref="IAutoFollowPattern.MaxPollTimeout"/> |
| 43 | + public Time MaxPollTimeout { get; set; } |
23 | 44 | } |
24 | 45 |
|
| 46 | + /// <inheritdoc cref="ICreateAutoFollowPatternRequest"/> |
25 | 47 | public partial class CreateAutoFollowPatternDescriptor |
26 | 48 | { |
27 | | - string ICreateAutoFollowPatternRequest.Cursor { get; set; } |
| 49 | + string IAutoFollowPattern.RemoteCluster { get; set; } |
| 50 | + IEnumerable<string> IAutoFollowPattern.LeaderIndexPatterns { get; set; } |
| 51 | + string IAutoFollowPattern.FollowIndexPattern { get; set; } |
| 52 | + int? IAutoFollowPattern.MaxReadRequestOperationCount { get; set; } |
| 53 | + long? IAutoFollowPattern.MaxOutstandingReadRequests { get; set; } |
| 54 | + string IAutoFollowPattern.MaxReadRequestSize { get; set; } |
| 55 | + int? IAutoFollowPattern.MaxWriteRequestOperationCount { get; set; } |
| 56 | + string IAutoFollowPattern.MaxWriteRequestSize { get; set; } |
| 57 | + int? IAutoFollowPattern.MaxOutstandingWriteRequests { get; set; } |
| 58 | + int? IAutoFollowPattern.MaxWriteBufferCount { get; set; } |
| 59 | + string IAutoFollowPattern.MaxWriteBufferSize { get; set; } |
| 60 | + Time IAutoFollowPattern.MaxRetryDelay { get; set; } |
| 61 | + Time IAutoFollowPattern.MaxPollTimeout { get; set; } |
| 62 | + |
| 63 | + /// <inheritdoc cref="IAutoFollowPattern.RemoteCluster"/> |
| 64 | + public CreateAutoFollowPatternDescriptor RemoteCluster(string remoteCluster) => Assign(a => a.RemoteCluster = remoteCluster); |
| 65 | + |
| 66 | + /// <inheritdoc cref="IAutoFollowPattern.LeaderIndexPatterns"/> |
| 67 | + public CreateAutoFollowPatternDescriptor LeaderIndexPatterns(IEnumerable<string> leaderIndexPatterns) => |
| 68 | + Assign(a => a.LeaderIndexPatterns = leaderIndexPatterns); |
| 69 | + |
| 70 | + /// <inheritdoc cref="IAutoFollowPattern.LeaderIndexPatterns"/> |
| 71 | + public CreateAutoFollowPatternDescriptor LeaderIndexPatterns(params string[] leaderIndexPatterns) => |
| 72 | + Assign(a => a.LeaderIndexPatterns = leaderIndexPatterns); |
| 73 | + |
| 74 | + /// <inheritdoc cref="IAutoFollowPattern.FollowIndexPattern"/> |
| 75 | + public CreateAutoFollowPatternDescriptor FollowIndexPattern(string followIndexPattern) => |
| 76 | + Assign(a => a.FollowIndexPattern = followIndexPattern); |
| 77 | + |
| 78 | + /// <inheritdoc cref="IAutoFollowPattern.MaxReadRequestOperationCount"/> |
| 79 | + public CreateAutoFollowPatternDescriptor MaxReadRequestOperationCount(int? maxReadRequestOperationCount) => |
| 80 | + Assign(a => a.MaxReadRequestOperationCount = maxReadRequestOperationCount); |
| 81 | + |
| 82 | + /// <inheritdoc cref="IAutoFollowPattern.MaxOutstandingReadRequests"/> |
| 83 | + public CreateAutoFollowPatternDescriptor MaxOutstandingReadRequests(long? maxOutstandingReadRequests) => |
| 84 | + Assign(a => a.MaxOutstandingReadRequests = maxOutstandingReadRequests); |
| 85 | + |
| 86 | + /// <inheritdoc cref="IAutoFollowPattern.MaxReadRequestSize"/> |
| 87 | + public CreateAutoFollowPatternDescriptor MaxReadRequestSize(string maxReadRequestSize) => |
| 88 | + Assign(a => a.MaxReadRequestSize = maxReadRequestSize); |
| 89 | + |
| 90 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteRequestOperationCount"/> |
| 91 | + public CreateAutoFollowPatternDescriptor MaxWriteRequestOperationCount(int? maxWriteRequestOperationCount) => |
| 92 | + Assign(a => a.MaxWriteRequestOperationCount = maxWriteRequestOperationCount); |
| 93 | + |
| 94 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteRequestSize"/> |
| 95 | + public CreateAutoFollowPatternDescriptor MaxWriteRequestSize(string maxWriteRequestSize) => |
| 96 | + Assign(a => a.MaxWriteRequestSize = maxWriteRequestSize); |
| 97 | + |
| 98 | + /// <inheritdoc cref="IAutoFollowPattern.MaxOutstandingWriteRequests"/> |
| 99 | + public CreateAutoFollowPatternDescriptor MaxOutstandingWriteRequests(int? maxOutstandingWriteRequests) => |
| 100 | + Assign(a => a.MaxOutstandingWriteRequests = maxOutstandingWriteRequests); |
| 101 | + |
| 102 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteBufferCount"/> |
| 103 | + public CreateAutoFollowPatternDescriptor MaxWriteBufferCount(int? maxWriteBufferCount) => |
| 104 | + Assign(a => a.MaxWriteBufferCount = maxWriteBufferCount); |
| 105 | + |
| 106 | + /// <inheritdoc cref="IAutoFollowPattern.MaxWriteBufferSize"/> |
| 107 | + public CreateAutoFollowPatternDescriptor MaxWriteBufferSize(string maxWriteBufferSize) => |
| 108 | + Assign(a => a.MaxWriteBufferSize = maxWriteBufferSize); |
| 109 | + |
| 110 | + /// <inheritdoc cref="IAutoFollowPattern.MaxRetryDelay"/> |
| 111 | + public CreateAutoFollowPatternDescriptor MaxRetryDelay(Time maxRetryDelay) => Assign(a => a.MaxRetryDelay = maxRetryDelay); |
28 | 112 |
|
29 | | - /// <inheritdoc cref="ICreateAutoFollowPatternRequest.Cursor" /> |
30 | | - public CreateAutoFollowPatternDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); |
| 113 | + /// <inheritdoc cref="IAutoFollowPattern.MaxPollTimeout"/> |
| 114 | + public CreateAutoFollowPatternDescriptor MaxPollTimeout(Time maxPollTimeout) => Assign(a => a.MaxPollTimeout = maxPollTimeout); |
31 | 115 | } |
32 | 116 | } |
0 commit comments