|
1 | 1 | using System; |
| 2 | +using Elasticsearch.Net; |
2 | 3 | using Newtonsoft.Json; |
3 | 4 |
|
4 | 5 | namespace Nest |
5 | 6 | { |
| 7 | + /// <summary> |
| 8 | + /// This API creates a new follower index that is configured to follow the referenced leader index. |
| 9 | + /// When this API returns, the follower index exists, and cross-cluster replication starts replicating operations |
| 10 | + /// from the leader index to the follower index |
| 11 | + /// </summary> |
6 | 12 | [MapsApi("ccr.follow.json")] |
7 | 13 | [ContractJsonConverter(typeof(ReadAsTypeJsonConverter<CreateFollowIndexRequest>))] |
8 | 14 | public partial interface ICreateFollowIndexRequest |
9 | 15 | { |
| 16 | + /// <summary> the remote cluster containing the leader index <para> |
| 17 | + [JsonProperty("remote_cluster")] |
| 18 | + string RemoteCluster { get; set; } |
| 19 | + |
| 20 | + /// <summary> the name of the index in the leader cluster to follow </summary> |
| 21 | + [JsonProperty("leader_index")] |
| 22 | + IndexName LeaderIndex { get; set; } |
| 23 | + |
| 24 | + /// <summary>the maximum number of operations to pull per read from the remote cluster </summary> |
| 25 | + [JsonProperty("max_read_request_operation_count")] |
| 26 | + long? MaxReadRequestOperationCount { get; set; } |
| 27 | + |
| 28 | + /// <summary>the maximum number of outstanding reads requests from the remote cluster</summary> |
| 29 | + [JsonProperty("max_outstanding_read_requests")] |
| 30 | + long? MaxOutstandingReadRequests { get; set; } |
| 31 | + |
| 32 | + /// <summary>the maximum size in bytes of per read of a batch of operations pulled from the remote cluster</summary> |
| 33 | + [JsonProperty("max_read_request_size")] |
| 34 | + string MaxRequestSize { get; set; } |
| 35 | + |
| 36 | + /// <summary>the maximum number of operations per bulk write request executed on the follower</summary> |
| 37 | + [JsonProperty("max_write_request_operation_count")] |
| 38 | + long? MaxWriteRequestOperationCount { get; set; } |
| 39 | + |
| 40 | + /// <summary>the maximum total bytes of operations per bulk write request executed on the follower</summary> |
| 41 | + [JsonProperty("max_write_request_size")] |
| 42 | + string MaxWriteRequestSize { get; set; } |
| 43 | + |
| 44 | + /// <summary>the maximum number of outstanding write requests on the follower</summary> |
| 45 | + [JsonProperty("max_outstanding_write_requests")] |
| 46 | + long? MaxOutstandingWriteRequests { get; set; } |
| 47 | + |
| 48 | + /// <summary> |
| 49 | + /// the maximum number of operations that can be queued for writing; when this limit is reached, reads from |
| 50 | + /// the remote cluster will be deferred until the number of queued operations goes below the limit |
| 51 | + /// </summary> |
| 52 | + [JsonProperty("max_write_buffer_count")] |
| 53 | + long? MaxWriteBufferCount { get; set; } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// the maximum total bytes of operations that can be queued for writing; when this limit is reached, reads |
| 57 | + /// from the remote cluster will be deferred until the total bytes of queued operations goes below the limit |
| 58 | + /// </summary> |
| 59 | + [JsonProperty("max_write_buffer_size")] |
| 60 | + string MaxWriteBufferSize { get; set; } |
| 61 | + |
| 62 | + /// <summary> |
| 63 | + /// the maximum time to wait before retrying an operation that failed exceptionally; an exponential backoff |
| 64 | + /// strategy is employed when retrying |
| 65 | + /// </summary> |
| 66 | + [JsonProperty("max_retry_delay")] |
| 67 | + Time MaxRetryDelay { get; set; } |
| 68 | + |
10 | 69 | /// <summary> |
11 | | - /// |
12 | | - /// <para> |
13 | | - /// </para> |
| 70 | + /// the maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the |
| 71 | + /// leader index; when the timeout has elapsed, the poll for operations will return to the follower so that it can |
| 72 | + /// update some statistics, and then the follower will immediately attempt to read from the leader again |
14 | 73 | /// </summary> |
15 | | - [JsonProperty("cursor")] |
16 | | - string Cursor { get; set; } |
| 74 | + [JsonProperty("read_poll_timeout")] |
| 75 | + Time ReadPollTimeout { get; set; } |
17 | 76 | } |
18 | 77 |
|
| 78 | + /// <inheritdoc cref="ICreateFollowIndexRequest"/> |
19 | 79 | public partial class CreateFollowIndexRequest |
20 | 80 | { |
21 | | - /// <inheritdoc cref="ICreateFollowIndexRequest.Cursor" /> |
22 | | - public string Cursor { get; set; } |
| 81 | + /// <inheritdoc cref="ICreateFollowIndexRequest.RemoteCluster"/> |
| 82 | + public string RemoteCluster { get; set; } |
| 83 | + |
| 84 | + /// <inheritdoc cref="ICreateFollowIndexRequest.LeaderIndex"/> |
| 85 | + public IndexName LeaderIndex { get; set; } |
| 86 | + |
| 87 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxReadRequestOperationCount"/> |
| 88 | + public long? MaxReadRequestOperationCount { get; set; } |
| 89 | + |
| 90 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxOutstandingReadRequests"/> |
| 91 | + public long? MaxOutstandingReadRequests { get; set; } |
| 92 | + |
| 93 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxRequestSize"/> |
| 94 | + public string MaxRequestSize { get; set; } |
| 95 | + |
| 96 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteRequestOperationCount"/> |
| 97 | + public long? MaxWriteRequestOperationCount { get; set; } |
| 98 | + |
| 99 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteRequestSize"/> |
| 100 | + public string MaxWriteRequestSize { get; set; } |
| 101 | + |
| 102 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxOutstandingWriteRequests"/> |
| 103 | + public long? MaxOutstandingWriteRequests { get; set; } |
| 104 | + |
| 105 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteBufferCount"/> |
| 106 | + public long? MaxWriteBufferCount { get; set; } |
| 107 | + |
| 108 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteBufferSize"/> |
| 109 | + public string MaxWriteBufferSize { get; set; } |
| 110 | + |
| 111 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxRetryDelay"/> |
| 112 | + public Time MaxRetryDelay { get; set; } |
| 113 | + |
| 114 | + /// <inheritdoc cref="ICreateFollowIndexRequest.ReadPollTimeout"/> |
| 115 | + public Time ReadPollTimeout { get; set; } |
23 | 116 | } |
24 | 117 |
|
| 118 | + /// <inheritdoc cref="ICreateFollowIndexRequest"/> |
25 | 119 | public partial class CreateFollowIndexDescriptor |
26 | 120 | { |
27 | | - string ICreateFollowIndexRequest.Cursor { get; set; } |
| 121 | + string ICreateFollowIndexRequest.RemoteCluster { get; set; } |
| 122 | + IndexName ICreateFollowIndexRequest.LeaderIndex { get; set; } |
| 123 | + long? ICreateFollowIndexRequest.MaxReadRequestOperationCount { get; set; } |
| 124 | + long? ICreateFollowIndexRequest.MaxOutstandingReadRequests { get; set; } |
| 125 | + string ICreateFollowIndexRequest.MaxRequestSize { get; set; } |
| 126 | + long? ICreateFollowIndexRequest.MaxWriteRequestOperationCount { get; set; } |
| 127 | + string ICreateFollowIndexRequest.MaxWriteRequestSize { get; set; } |
| 128 | + long? ICreateFollowIndexRequest.MaxOutstandingWriteRequests { get; set; } |
| 129 | + long? ICreateFollowIndexRequest.MaxWriteBufferCount { get; set; } |
| 130 | + string ICreateFollowIndexRequest.MaxWriteBufferSize { get; set; } |
| 131 | + Time ICreateFollowIndexRequest.MaxRetryDelay { get; set; } |
| 132 | + Time ICreateFollowIndexRequest.ReadPollTimeout { get; set; } |
| 133 | + |
| 134 | + /// <inheritdoc cref="ICreateFollowIndexRequest.RemoteCluster"/> |
| 135 | + public CreateFollowIndexDescriptor RemoteCluster(string remoteCluster) => Assign(a => a.RemoteCluster = remoteCluster); |
| 136 | + |
| 137 | + /// <inheritdoc cref="ICreateFollowIndexRequest.LeaderIndex"/> |
| 138 | + public CreateFollowIndexDescriptor LeaderIndex(IndexName index) => Assign(a => a.LeaderIndex = index); |
| 139 | + |
| 140 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxReadRequestOperationCount"/> |
| 141 | + public CreateFollowIndexDescriptor MaxReadRequestOperationCount(long? max) => Assign(a => a.MaxReadRequestOperationCount = max); |
| 142 | + |
| 143 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxOutstandingReadRequests"/> |
| 144 | + public CreateFollowIndexDescriptor MaxOutstandingReadRequests(long? max) => Assign(a => a.MaxOutstandingReadRequests = max); |
| 145 | + |
| 146 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxRequestSize"/> |
| 147 | + public CreateFollowIndexDescriptor MaxRequestSize(string maxRequestSize) => Assign(a => a.MaxRequestSize = maxRequestSize); |
| 148 | + |
| 149 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteRequestOperationCount"/> |
| 150 | + public CreateFollowIndexDescriptor MaxWriteRequestOperationCount(long? max) => Assign(a => a.MaxWriteRequestOperationCount = max); |
| 151 | + |
| 152 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteRequestSize"/> |
| 153 | + public CreateFollowIndexDescriptor MaxWriteRequestSize(string maxSize) => Assign(a => a.MaxWriteRequestSize = maxSize); |
| 154 | + |
| 155 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxOutstandingWriteRequests"/> |
| 156 | + public CreateFollowIndexDescriptor MaxOutstandingWriteRequests(long? max) => Assign(a => a.MaxOutstandingWriteRequests = max); |
| 157 | + |
| 158 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteBufferCount"/> |
| 159 | + public CreateFollowIndexDescriptor MaxWriteBufferCount(long? max) => Assign(a => a.MaxWriteBufferCount = max); |
| 160 | + |
| 161 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxWriteBufferSize"/> |
| 162 | + public CreateFollowIndexDescriptor MaxWriteBufferSize(string max) => Assign(a => a.MaxWriteBufferSize = max); |
| 163 | + |
| 164 | + /// <inheritdoc cref="ICreateFollowIndexRequest.MaxRetryDelay"/> |
| 165 | + public CreateFollowIndexDescriptor MaxRetryDelay(Time maxRetryDelay) => Assign(a => a.MaxRetryDelay = maxRetryDelay); |
28 | 166 |
|
29 | | - /// <inheritdoc cref="ICreateFollowIndexRequest.Cursor" /> |
30 | | - public CreateFollowIndexDescriptor Cursor(string cursor) => Assign(a => a.Cursor = cursor); |
| 167 | + /// <inheritdoc cref="ICreateFollowIndexRequest.ReadPollTimeout"/> |
| 168 | + public CreateFollowIndexDescriptor ReadPollTimeout(Time readPollTimeout) => Assign(a => a.ReadPollTimeout = readPollTimeout); |
31 | 169 | } |
32 | 170 | } |
0 commit comments