2020/** List of the different monitor threshold available. */
2121@ JsonPropertyOrder ({
2222 MonitorThresholds .JSON_PROPERTY_CRITICAL ,
23+ MonitorThresholds .JSON_PROPERTY_CRITICAL_QUERY ,
2324 MonitorThresholds .JSON_PROPERTY_CRITICAL_RECOVERY ,
25+ MonitorThresholds .JSON_PROPERTY_CRITICAL_RECOVERY_QUERY ,
2426 MonitorThresholds .JSON_PROPERTY_OK ,
2527 MonitorThresholds .JSON_PROPERTY_UNKNOWN ,
2628 MonitorThresholds .JSON_PROPERTY_WARNING ,
@@ -33,9 +35,15 @@ public class MonitorThresholds {
3335 public static final String JSON_PROPERTY_CRITICAL = "critical" ;
3436 private Double critical ;
3537
38+ public static final String JSON_PROPERTY_CRITICAL_QUERY = "critical_query" ;
39+ private String criticalQuery ;
40+
3641 public static final String JSON_PROPERTY_CRITICAL_RECOVERY = "critical_recovery" ;
3742 private JsonNullable <Double > criticalRecovery = JsonNullable .<Double >undefined ();
3843
44+ public static final String JSON_PROPERTY_CRITICAL_RECOVERY_QUERY = "critical_recovery_query" ;
45+ private String criticalRecoveryQuery ;
46+
3947 public static final String JSON_PROPERTY_OK = "ok" ;
4048 private JsonNullable <Double > ok = JsonNullable .<Double >undefined ();
4149
@@ -69,6 +77,28 @@ public void setCritical(Double critical) {
6977 this .critical = critical ;
7078 }
7179
80+ public MonitorThresholds criticalQuery (String criticalQuery ) {
81+ this .criticalQuery = criticalQuery ;
82+ return this ;
83+ }
84+
85+ /**
86+ * Query evaluated as a dynamic <code>CRITICAL</code> threshold. Only supported on metric monitors
87+ * with a formula query. Cannot be combined with static thresholds. This field is in preview.
88+ *
89+ * @return criticalQuery
90+ */
91+ @ jakarta .annotation .Nullable
92+ @ JsonProperty (JSON_PROPERTY_CRITICAL_QUERY )
93+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
94+ public String getCriticalQuery () {
95+ return criticalQuery ;
96+ }
97+
98+ public void setCriticalQuery (String criticalQuery ) {
99+ this .criticalQuery = criticalQuery ;
100+ }
101+
72102 public MonitorThresholds criticalRecovery (Double criticalRecovery ) {
73103 this .criticalRecovery = JsonNullable .<Double >of (criticalRecovery );
74104 return this ;
@@ -100,6 +130,29 @@ public void setCriticalRecovery(Double criticalRecovery) {
100130 this .criticalRecovery = JsonNullable .<Double >of (criticalRecovery );
101131 }
102132
133+ public MonitorThresholds criticalRecoveryQuery (String criticalRecoveryQuery ) {
134+ this .criticalRecoveryQuery = criticalRecoveryQuery ;
135+ return this ;
136+ }
137+
138+ /**
139+ * Query evaluated as a dynamic <code>CRITICAL</code> recovery threshold. Only supported on metric
140+ * monitors with a formula query. Cannot be combined with static thresholds. This field is in
141+ * preview.
142+ *
143+ * @return criticalRecoveryQuery
144+ */
145+ @ jakarta .annotation .Nullable
146+ @ JsonProperty (JSON_PROPERTY_CRITICAL_RECOVERY_QUERY )
147+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
148+ public String getCriticalRecoveryQuery () {
149+ return criticalRecoveryQuery ;
150+ }
151+
152+ public void setCriticalRecoveryQuery (String criticalRecoveryQuery ) {
153+ this .criticalRecoveryQuery = criticalRecoveryQuery ;
154+ }
155+
103156 public MonitorThresholds ok (Double ok ) {
104157 this .ok = JsonNullable .<Double >of (ok );
105158 return this ;
@@ -281,7 +334,9 @@ public boolean equals(Object o) {
281334 }
282335 MonitorThresholds monitorThresholds = (MonitorThresholds ) o ;
283336 return Objects .equals (this .critical , monitorThresholds .critical )
337+ && Objects .equals (this .criticalQuery , monitorThresholds .criticalQuery )
284338 && Objects .equals (this .criticalRecovery , monitorThresholds .criticalRecovery )
339+ && Objects .equals (this .criticalRecoveryQuery , monitorThresholds .criticalRecoveryQuery )
285340 && Objects .equals (this .ok , monitorThresholds .ok )
286341 && Objects .equals (this .unknown , monitorThresholds .unknown )
287342 && Objects .equals (this .warning , monitorThresholds .warning )
@@ -292,15 +347,27 @@ public boolean equals(Object o) {
292347 @ Override
293348 public int hashCode () {
294349 return Objects .hash (
295- critical , criticalRecovery , ok , unknown , warning , warningRecovery , additionalProperties );
350+ critical ,
351+ criticalQuery ,
352+ criticalRecovery ,
353+ criticalRecoveryQuery ,
354+ ok ,
355+ unknown ,
356+ warning ,
357+ warningRecovery ,
358+ additionalProperties );
296359 }
297360
298361 @ Override
299362 public String toString () {
300363 StringBuilder sb = new StringBuilder ();
301364 sb .append ("class MonitorThresholds {\n " );
302365 sb .append (" critical: " ).append (toIndentedString (critical )).append ("\n " );
366+ sb .append (" criticalQuery: " ).append (toIndentedString (criticalQuery )).append ("\n " );
303367 sb .append (" criticalRecovery: " ).append (toIndentedString (criticalRecovery )).append ("\n " );
368+ sb .append (" criticalRecoveryQuery: " )
369+ .append (toIndentedString (criticalRecoveryQuery ))
370+ .append ("\n " );
304371 sb .append (" ok: " ).append (toIndentedString (ok )).append ("\n " );
305372 sb .append (" unknown: " ).append (toIndentedString (unknown )).append ("\n " );
306373 sb .append (" warning: " ).append (toIndentedString (warning )).append ("\n " );
0 commit comments