@@ -9,58 +9,58 @@ namespace Nest
99 public interface IClusterAllocationExplainResponse : IResponse
1010 {
1111 [ JsonProperty ( "shard" ) ]
12- ShardAllocationExplanation Shard { get ; set ; }
12+ ShardAllocationExplanation Shard { get ; }
1313
1414 [ JsonProperty ( "assigned" ) ]
15- bool Assigned { get ; set ; }
15+ bool Assigned { get ; }
1616
1717 [ JsonProperty ( "assigned_node_id" ) ]
18- string AssignedNodeId { get ; set ; }
18+ string AssignedNodeId { get ; }
1919
2020 [ JsonProperty ( "shard_state_fetch_pending" ) ]
21- bool ShardStateFetchPending { get ; set ; }
21+ bool ShardStateFetchPending { get ; }
2222
2323 [ JsonProperty ( "unassigned_info" ) ]
24- UnassignedInformation UnassignedInformation { get ; set ; }
24+ UnassignedInformation UnassignedInformation { get ; }
2525
2626 [ JsonProperty ( "allocation_delay" ) ]
27- string AllocationDelay { get ; set ; }
27+ string AllocationDelay { get ; }
2828
2929 [ JsonProperty ( "allocation_delay_ms" ) ]
30- long AllocationDelayInMilliseconds { get ; set ; }
30+ long AllocationDelayInMilliseconds { get ; }
3131
3232 [ JsonProperty ( "remaining_delay" ) ]
33- string RemainingDelay { get ; set ; }
33+ string RemainingDelay { get ; }
3434
3535 [ JsonProperty ( "remaining_delay_ms" ) ]
36- long RemainingDelayInMilliseconds { get ; set ; }
36+ long RemainingDelayInMilliseconds { get ; }
3737
3838 [ JsonProperty ( "nodes" ) ]
3939 [ JsonConverter ( typeof ( VerbatimDictionaryKeysJsonConverter ) ) ]
40- Dictionary < string , NodeAllocationExplanation > Nodes { get ; set ; }
40+ IReadOnlyDictionary < string , NodeAllocationExplanation > Nodes { get ; }
4141 }
4242
4343 public class ClusterAllocationExplainResponse : ResponseBase , IClusterAllocationExplainResponse
4444 {
45- public ShardAllocationExplanation Shard { get ; set ; }
45+ public ShardAllocationExplanation Shard { get ; internal set ; }
4646
47- public bool Assigned { get ; set ; }
47+ public bool Assigned { get ; internal set ; }
4848
49- public string AssignedNodeId { get ; set ; }
49+ public string AssignedNodeId { get ; internal set ; }
5050
51- public bool ShardStateFetchPending { get ; set ; }
51+ public bool ShardStateFetchPending { get ; internal set ; }
5252
53- public UnassignedInformation UnassignedInformation { get ; set ; }
53+ public UnassignedInformation UnassignedInformation { get ; internal set ; }
5454
55- public string AllocationDelay { get ; set ; }
55+ public string AllocationDelay { get ; internal set ; }
5656
57- public long AllocationDelayInMilliseconds { get ; set ; }
57+ public long AllocationDelayInMilliseconds { get ; internal set ; }
5858
59- public string RemainingDelay { get ; set ; }
59+ public string RemainingDelay { get ; internal set ; }
6060
61- public long RemainingDelayInMilliseconds { get ; set ; }
61+ public long RemainingDelayInMilliseconds { get ; internal set ; }
6262
63- public Dictionary < string , NodeAllocationExplanation > Nodes { get ; set ; }
63+ public IReadOnlyDictionary < string , NodeAllocationExplanation > Nodes { get ; internal set ; } = EmptyReadOnly < string , NodeAllocationExplanation > . Dictionary ;
6464 }
6565
6666 [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
@@ -86,7 +86,7 @@ public class NodeAllocationExplanation
8686 public string NodeName { get ; set ; }
8787
8888 [ JsonProperty ( "node_attributes" ) ]
89- public Dictionary < string , string > NodeAttributes { get ; set ; }
89+ public IReadOnlyDictionary < string , string > NodeAttributes { get ; set ; } = EmptyReadOnly < string , string > . Dictionary ;
9090
9191 [ JsonProperty ( "store" ) ]
9292 public AllocationStore Store { get ; set ; }
@@ -102,7 +102,7 @@ public class NodeAllocationExplanation
102102 public float Weight { get ; set ; }
103103
104104 [ JsonProperty ( "decisions" ) ]
105- public IEnumerable < AllocationDecision > Decisions { get ; set ; }
105+ public IReadOnlyCollection < AllocationDecision > Decisions { get ; set ; } = EmptyReadOnly < AllocationDecision > . Collection ;
106106 }
107107
108108 [ JsonObject ]
@@ -160,68 +160,68 @@ public enum UnassignedInformationReason
160160 IndexCreated ,
161161
162162 ///<summary>
163- /// Unassigned as a result of a full cluster recovery.
164- ///</summary>
163+ /// Unassigned as a result of a full cluster recovery.
164+ ///</summary>
165165 [ EnumMember ( Value = "CLUSTER_RECOVERED" ) ]
166166 ClusterRecovered ,
167167
168168 ///<summary>
169- /// Unassigned as a result of opening a closed index.
170- ///</summary>
169+ /// Unassigned as a result of opening a closed index.
170+ ///</summary>
171171 [ EnumMember ( Value = "INDEX_REOPENED" ) ]
172172 IndexReopened ,
173173
174174 ///<summary>
175- /// Unassigned as a result of importing a dangling index.
176- ///</summary>
175+ /// Unassigned as a result of importing a dangling index.
176+ ///</summary>
177177 [ EnumMember ( Value = "DANGLING_INDEX_IMPORTED" ) ]
178178 DanglingIndexImported ,
179179
180180 ///<summary>
181- /// Unassigned as a result of restoring into a new index.
182- ///</summary>
181+ /// Unassigned as a result of restoring into a new index.
182+ ///</summary>
183183 [ EnumMember ( Value = "NEW_INDEX_RESTORED" ) ]
184184 NewIndexRestored ,
185185
186186 ///<summary>
187- /// Unassigned as a result of restoring into a closed index.
188- ///</summary>
187+ /// Unassigned as a result of restoring into a closed index.
188+ ///</summary>
189189 [ EnumMember ( Value = "EXISTING_INDEX_RESTORED" ) ]
190190 ExistingIndexRestored ,
191191
192192 ///<summary>
193- /// Unassigned as a result of explicit addition of a replica.
194- ///</summary>
193+ /// Unassigned as a result of explicit addition of a replica.
194+ ///</summary>
195195 [ EnumMember ( Value = "REPLICA_ADDED" ) ]
196196 ReplicaAdded ,
197197
198198 ///<summary>
199- /// Unassigned as a result of a failed allocation of the shard.
200- ///</summary>
199+ /// Unassigned as a result of a failed allocation of the shard.
200+ ///</summary>
201201 [ EnumMember ( Value = "ALLOCATION_FAILED" ) ]
202202 AllocationFailed ,
203203
204204 ///<summary>
205- /// Unassigned as a result of the node hosting it leaving the cluster.
206- ///</summary>
205+ /// Unassigned as a result of the node hosting it leaving the cluster.
206+ ///</summary>
207207 [ EnumMember ( Value = "NODE_LEFT" ) ]
208208 NodeLeft ,
209209
210210 ///<summary>
211- /// Unassigned as a result of explicit cancel reroute command.
212- ///</summary>
211+ /// Unassigned as a result of explicit cancel reroute command.
212+ ///</summary>
213213 [ EnumMember ( Value = "REROUTE_CANCELLED" ) ]
214214 RerouteCancelled ,
215215
216216 ///<summary>
217- /// When a shard moves from started back to initializing, for example, during shadow replica
218- ///</summary>
217+ /// When a shard moves from started back to initializing, for example, during shadow replica
218+ ///</summary>
219219 [ EnumMember ( Value = "REINITIALIZED" ) ]
220220 Reinitialized ,
221221
222222 ///<summary>
223- /// A better replica location is identified and causes the existing replica allocation to be cancelled.
224- ///</summary>
223+ /// A better replica location is identified and causes the existing replica allocation to be cancelled.
224+ ///</summary>
225225 [ EnumMember ( Value = "REALLOCATED_REPLICA" ) ]
226226 ReallocatedReplica
227227 }
0 commit comments