@@ -5,30 +5,87 @@ namespace Nest
55{
66 public interface IXPackUsageResponse : IResponse
77 {
8- [ JsonProperty ( "watcher " ) ]
9- AlertingUsage Alerting { get ; }
8+ [ JsonProperty ( "ccr " ) ]
9+ CcrUsage Ccr { get ; }
1010
1111 [ JsonProperty ( "graph" ) ]
1212 XPackUsage Graph { get ; }
1313
14+ [ JsonProperty ( "logstash" ) ]
15+ XPackUsage Logstash { get ; }
16+
1417 [ JsonProperty ( "ml" ) ]
1518 MachineLearningUsage MachineLearning { get ; }
1619
1720 [ JsonProperty ( "monitoring" ) ]
1821 MonitoringUsage Monitoring { get ; }
1922
23+ [ JsonProperty ( "rollup" ) ]
24+ XPackUsage Rollup { get ; }
25+
2026 [ JsonProperty ( "security" ) ]
2127 SecurityUsage Security { get ; }
28+
29+ [ JsonProperty ( "sql" ) ]
30+ SqlUsage Sql { get ; }
31+
32+ [ JsonProperty ( "watcher" ) ]
33+ AlertingUsage Alerting { get ; }
34+ }
35+
36+ public class SqlUsage : XPackUsage
37+ {
38+ [ JsonProperty ( "features" ) ]
39+ public IReadOnlyDictionary < string , int > Features { get ; set ; } = EmptyReadOnly < string , int > . Dictionary ;
40+
41+ [ JsonProperty ( "queries" ) ]
42+ public IReadOnlyDictionary < string , QueryUsage > Queries { get ; set ; } = EmptyReadOnly < string , QueryUsage > . Dictionary ;
43+ }
44+
45+ public class QueryUsage
46+ {
47+ [ JsonProperty ( "total" ) ]
48+ public int Total { get ; internal set ; }
49+
50+ [ JsonProperty ( "paging" ) ]
51+ public int Paging { get ; internal set ; }
52+
53+ [ JsonProperty ( "failed" ) ]
54+ public int Failed { get ; internal set ; }
55+
56+ [ JsonProperty ( "count" ) ]
57+ public int ? Count { get ; internal set ; }
58+ }
59+
60+ public class CcrUsage : XPackUsage
61+ {
62+ [ JsonProperty ( "auto_follow_patterns_count" ) ]
63+ public int AutoFollowPatternsCount { get ; internal set ; }
64+
65+ [ JsonProperty ( "follower_indices_count" ) ]
66+ public int FollowerIndicesCount { get ; internal set ; }
2267 }
2368
2469 public class XPackUsageResponse : ResponseBase , IXPackUsageResponse
2570 {
71+ [ JsonProperty ( "sql" ) ]
72+ public SqlUsage Sql { get ; internal set ; }
73+
74+ [ JsonProperty ( "rollup" ) ]
75+ public XPackUsage Rollup { get ; internal set ; }
76+
77+ [ JsonProperty ( "ccr" ) ]
78+ public CcrUsage Ccr { get ; internal set ; }
79+
2680 [ JsonProperty ( "watcher" ) ]
2781 public AlertingUsage Alerting { get ; internal set ; }
2882
2983 [ JsonProperty ( "graph" ) ]
3084 public XPackUsage Graph { get ; internal set ; }
3185
86+ [ JsonProperty ( "logstash" ) ]
87+ public XPackUsage Logstash { get ; internal set ; }
88+
3289 [ JsonProperty ( "ml" ) ]
3390 public MachineLearningUsage MachineLearning { get ; internal set ; }
3491
@@ -41,7 +98,10 @@ public class XPackUsageResponse : ResponseBase, IXPackUsageResponse
4198
4299 public class XPackUsage
43100 {
101+ [ JsonProperty ( "available" ) ]
44102 public bool Available { get ; internal set ; }
103+
104+ [ JsonProperty ( "enabled" ) ]
45105 public bool Enabled { get ; internal set ; }
46106 }
47107
@@ -59,6 +119,9 @@ public class SecurityUsage : XPackUsage
59119 [ JsonProperty ( "realms" ) ]
60120 public IReadOnlyDictionary < string , RealmUsage > Realms { get ; internal set ; } = EmptyReadOnly < string , RealmUsage > . Dictionary ;
61121
122+ [ JsonProperty ( "role_mapping" ) ]
123+ public IReadOnlyDictionary < string , RoleMappingUsage > RoleMapping { get ; internal set ; } = EmptyReadOnly < string , RoleMappingUsage > . Dictionary ;
124+
62125 [ JsonProperty ( "roles" ) ]
63126 public IReadOnlyDictionary < string , RoleUsage > Roles { get ; internal set ; } = EmptyReadOnly < string , RoleUsage > . Dictionary ;
64127
@@ -68,6 +131,15 @@ public class SecurityUsage : XPackUsage
68131 [ JsonProperty ( "system_key" ) ]
69132 public SecurityFeatureToggle SystemKey { get ; internal set ; }
70133
134+ public class RoleMappingUsage
135+ {
136+ [ JsonProperty ( "enabled" ) ]
137+ public int Enabled { get ; internal set ; }
138+
139+ [ JsonProperty ( "size" ) ]
140+ public int Size { get ; internal set ; }
141+ }
142+
71143 public class AuditUsage : SecurityFeatureToggle
72144 {
73145 [ JsonProperty ( "outputs" ) ]
@@ -131,12 +203,24 @@ public class AlertingUsage : XPackUsage
131203 [ JsonProperty ( "execution" ) ]
132204 public AlertingExecution Execution { get ; internal set ; }
133205
206+ [ JsonProperty ( "watch" ) ]
207+ public AlertingInput Watch { get ; internal set ; }
208+
134209 public class AlertingExecution
135210 {
136211 [ JsonProperty ( "actions" ) ]
137212 public IReadOnlyDictionary < string , ExecutionAction > Actions { get ; internal set ; } = EmptyReadOnly < string , ExecutionAction > . Dictionary ;
138213 }
139214
215+ public class AlertingInput
216+ {
217+ [ JsonProperty ( "input" ) ]
218+ public IReadOnlyDictionary < string , AlertingCount > Input { get ; internal set ; } = EmptyReadOnly < string , AlertingCount > . Dictionary ;
219+
220+ [ JsonProperty ( "trigger" ) ]
221+ public IReadOnlyDictionary < string , AlertingCount > Trigger { get ; internal set ; } = EmptyReadOnly < string , AlertingCount > . Dictionary ;
222+ }
223+
140224 public class ExecutionAction
141225 {
142226 [ JsonProperty ( "total" ) ]
@@ -158,6 +242,9 @@ public class AlertingCount
158242
159243 public class MonitoringUsage : XPackUsage
160244 {
245+ [ JsonProperty ( "collection_enabled" ) ]
246+ public bool CollectionEnabled { get ; internal set ; }
247+
161248 [ JsonProperty ( "enabled_exporters" ) ]
162249 public IReadOnlyDictionary < string , long > EnabledExporters { get ; set ; } = EmptyReadOnly < string , long > . Dictionary ;
163250 }
0 commit comments