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,29 @@ 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 and options['variables']. Cannot be combined with static thresholds. This
88+ * field is in preview.
89+ *
90+ * @return criticalQuery
91+ */
92+ @ jakarta .annotation .Nullable
93+ @ JsonProperty (JSON_PROPERTY_CRITICAL_QUERY )
94+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
95+ public String getCriticalQuery () {
96+ return criticalQuery ;
97+ }
98+
99+ public void setCriticalQuery (String criticalQuery ) {
100+ this .criticalQuery = criticalQuery ;
101+ }
102+
72103 public MonitorThresholds criticalRecovery (Double criticalRecovery ) {
73104 this .criticalRecovery = JsonNullable .<Double >of (criticalRecovery );
74105 return this ;
@@ -100,6 +131,29 @@ public void setCriticalRecovery(Double criticalRecovery) {
100131 this .criticalRecovery = JsonNullable .<Double >of (criticalRecovery );
101132 }
102133
134+ public MonitorThresholds criticalRecoveryQuery (String criticalRecoveryQuery ) {
135+ this .criticalRecoveryQuery = criticalRecoveryQuery ;
136+ return this ;
137+ }
138+
139+ /**
140+ * Query evaluated as a dynamic <code>CRITICAL</code> recovery threshold. Only supported on metric
141+ * monitors with a formula query and options['variables']. Cannot be combined with static
142+ * thresholds. This field is in preview.
143+ *
144+ * @return criticalRecoveryQuery
145+ */
146+ @ jakarta .annotation .Nullable
147+ @ JsonProperty (JSON_PROPERTY_CRITICAL_RECOVERY_QUERY )
148+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
149+ public String getCriticalRecoveryQuery () {
150+ return criticalRecoveryQuery ;
151+ }
152+
153+ public void setCriticalRecoveryQuery (String criticalRecoveryQuery ) {
154+ this .criticalRecoveryQuery = criticalRecoveryQuery ;
155+ }
156+
103157 public MonitorThresholds ok (Double ok ) {
104158 this .ok = JsonNullable .<Double >of (ok );
105159 return this ;
@@ -281,7 +335,9 @@ public boolean equals(Object o) {
281335 }
282336 MonitorThresholds monitorThresholds = (MonitorThresholds ) o ;
283337 return Objects .equals (this .critical , monitorThresholds .critical )
338+ && Objects .equals (this .criticalQuery , monitorThresholds .criticalQuery )
284339 && Objects .equals (this .criticalRecovery , monitorThresholds .criticalRecovery )
340+ && Objects .equals (this .criticalRecoveryQuery , monitorThresholds .criticalRecoveryQuery )
285341 && Objects .equals (this .ok , monitorThresholds .ok )
286342 && Objects .equals (this .unknown , monitorThresholds .unknown )
287343 && Objects .equals (this .warning , monitorThresholds .warning )
@@ -292,15 +348,27 @@ public boolean equals(Object o) {
292348 @ Override
293349 public int hashCode () {
294350 return Objects .hash (
295- critical , criticalRecovery , ok , unknown , warning , warningRecovery , additionalProperties );
351+ critical ,
352+ criticalQuery ,
353+ criticalRecovery ,
354+ criticalRecoveryQuery ,
355+ ok ,
356+ unknown ,
357+ warning ,
358+ warningRecovery ,
359+ additionalProperties );
296360 }
297361
298362 @ Override
299363 public String toString () {
300364 StringBuilder sb = new StringBuilder ();
301365 sb .append ("class MonitorThresholds {\n " );
302366 sb .append (" critical: " ).append (toIndentedString (critical )).append ("\n " );
367+ sb .append (" criticalQuery: " ).append (toIndentedString (criticalQuery )).append ("\n " );
303368 sb .append (" criticalRecovery: " ).append (toIndentedString (criticalRecovery )).append ("\n " );
369+ sb .append (" criticalRecoveryQuery: " )
370+ .append (toIndentedString (criticalRecoveryQuery ))
371+ .append ("\n " );
304372 sb .append (" ok: " ).append (toIndentedString (ok )).append ("\n " );
305373 sb .append (" unknown: " ).append (toIndentedString (unknown )).append ("\n " );
306374 sb .append (" warning: " ).append (toIndentedString (warning )).append ("\n " );
0 commit comments