1616import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
1717import io .swagger .annotations .ApiModel ;
1818import io .swagger .annotations .ApiModelProperty ;
19+ import java .util .ArrayList ;
20+ import java .util .List ;
1921import java .util .Objects ;
2022
2123/** Updated change widget. */
2527 ChangeWidgetRequest .JSON_PROPERTY_CHANGE_TYPE ,
2628 ChangeWidgetRequest .JSON_PROPERTY_COMPARE_TO ,
2729 ChangeWidgetRequest .JSON_PROPERTY_EVENT_QUERY ,
30+ ChangeWidgetRequest .JSON_PROPERTY_FORMULAS ,
2831 ChangeWidgetRequest .JSON_PROPERTY_INCREASE_GOOD ,
2932 ChangeWidgetRequest .JSON_PROPERTY_LOG_QUERY ,
3033 ChangeWidgetRequest .JSON_PROPERTY_NETWORK_QUERY ,
3336 ChangeWidgetRequest .JSON_PROPERTY_PROCESS_QUERY ,
3437 ChangeWidgetRequest .JSON_PROPERTY_PROFILE_METRICS_QUERY ,
3538 ChangeWidgetRequest .JSON_PROPERTY_Q ,
39+ ChangeWidgetRequest .JSON_PROPERTY_QUERIES ,
40+ ChangeWidgetRequest .JSON_PROPERTY_RESPONSE_FORMAT ,
3641 ChangeWidgetRequest .JSON_PROPERTY_RUM_QUERY ,
3742 ChangeWidgetRequest .JSON_PROPERTY_SECURITY_QUERY ,
3843 ChangeWidgetRequest .JSON_PROPERTY_SHOW_PRESENT
@@ -52,6 +57,9 @@ public class ChangeWidgetRequest {
5257 public static final String JSON_PROPERTY_EVENT_QUERY = "event_query" ;
5358 private LogQueryDefinition eventQuery ;
5459
60+ public static final String JSON_PROPERTY_FORMULAS = "formulas" ;
61+ private List <WidgetFormula > formulas = null ;
62+
5563 public static final String JSON_PROPERTY_INCREASE_GOOD = "increase_good" ;
5664 private Boolean increaseGood ;
5765
@@ -76,6 +84,12 @@ public class ChangeWidgetRequest {
7684 public static final String JSON_PROPERTY_Q = "q" ;
7785 private String q ;
7886
87+ public static final String JSON_PROPERTY_QUERIES = "queries" ;
88+ private List <FormulaAndFunctionQueryDefinition > queries = null ;
89+
90+ public static final String JSON_PROPERTY_RESPONSE_FORMAT = "response_format" ;
91+ private FormulaAndFunctionResponseFormat responseFormat ;
92+
7993 public static final String JSON_PROPERTY_RUM_QUERY = "rum_query" ;
8094 private LogQueryDefinition rumQuery ;
8195
@@ -183,6 +197,41 @@ public void setEventQuery(LogQueryDefinition eventQuery) {
183197 this .eventQuery = eventQuery ;
184198 }
185199
200+ public ChangeWidgetRequest formulas (List <WidgetFormula > formulas ) {
201+ this .formulas = formulas ;
202+ for (WidgetFormula item : formulas ) {
203+ this .unparsed |= item .unparsed ;
204+ }
205+ return this ;
206+ }
207+
208+ public ChangeWidgetRequest addFormulasItem (WidgetFormula formulasItem ) {
209+ if (this .formulas == null ) {
210+ this .formulas = new ArrayList <>();
211+ }
212+ this .formulas .add (formulasItem );
213+ this .unparsed |= formulasItem .unparsed ;
214+ return this ;
215+ }
216+
217+ /**
218+ * List of formulas that operate on queries. **This feature is currently in beta.**
219+ *
220+ * @return formulas
221+ */
222+ @ javax .annotation .Nullable
223+ @ ApiModelProperty (
224+ value = "List of formulas that operate on queries. **This feature is currently in beta.**" )
225+ @ JsonProperty (JSON_PROPERTY_FORMULAS )
226+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
227+ public List <WidgetFormula > getFormulas () {
228+ return formulas ;
229+ }
230+
231+ public void setFormulas (List <WidgetFormula > formulas ) {
232+ this .formulas = formulas ;
233+ }
234+
186235 public ChangeWidgetRequest increaseGood (Boolean increaseGood ) {
187236 this .increaseGood = increaseGood ;
188237 return this ;
@@ -371,6 +420,70 @@ public void setQ(String q) {
371420 this .q = q ;
372421 }
373422
423+ public ChangeWidgetRequest queries (List <FormulaAndFunctionQueryDefinition > queries ) {
424+ this .queries = queries ;
425+ for (FormulaAndFunctionQueryDefinition item : queries ) {
426+ this .unparsed |= item .unparsed ;
427+ }
428+ return this ;
429+ }
430+
431+ public ChangeWidgetRequest addQueriesItem (FormulaAndFunctionQueryDefinition queriesItem ) {
432+ if (this .queries == null ) {
433+ this .queries = new ArrayList <>();
434+ }
435+ this .queries .add (queriesItem );
436+ this .unparsed |= queriesItem .unparsed ;
437+ return this ;
438+ }
439+
440+ /**
441+ * List of queries that can be returned directly or used in formulas. **This feature is currently
442+ * in beta.**
443+ *
444+ * @return queries
445+ */
446+ @ javax .annotation .Nullable
447+ @ ApiModelProperty (
448+ value =
449+ "List of queries that can be returned directly or used in formulas. **This feature is"
450+ + " currently in beta.**" )
451+ @ JsonProperty (JSON_PROPERTY_QUERIES )
452+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
453+ public List <FormulaAndFunctionQueryDefinition > getQueries () {
454+ return queries ;
455+ }
456+
457+ public void setQueries (List <FormulaAndFunctionQueryDefinition > queries ) {
458+ this .queries = queries ;
459+ }
460+
461+ public ChangeWidgetRequest responseFormat (FormulaAndFunctionResponseFormat responseFormat ) {
462+ this .responseFormat = responseFormat ;
463+ this .unparsed |= !responseFormat .isValid ();
464+ return this ;
465+ }
466+
467+ /**
468+ * Get responseFormat
469+ *
470+ * @return responseFormat
471+ */
472+ @ javax .annotation .Nullable
473+ @ ApiModelProperty (value = "" )
474+ @ JsonProperty (JSON_PROPERTY_RESPONSE_FORMAT )
475+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
476+ public FormulaAndFunctionResponseFormat getResponseFormat () {
477+ return responseFormat ;
478+ }
479+
480+ public void setResponseFormat (FormulaAndFunctionResponseFormat responseFormat ) {
481+ if (!responseFormat .isValid ()) {
482+ this .unparsed = true ;
483+ }
484+ this .responseFormat = responseFormat ;
485+ }
486+
374487 public ChangeWidgetRequest rumQuery (LogQueryDefinition rumQuery ) {
375488 this .rumQuery = rumQuery ;
376489 this .unparsed |= rumQuery .unparsed ;
@@ -453,6 +566,7 @@ public boolean equals(Object o) {
453566 && Objects .equals (this .changeType , changeWidgetRequest .changeType )
454567 && Objects .equals (this .compareTo , changeWidgetRequest .compareTo )
455568 && Objects .equals (this .eventQuery , changeWidgetRequest .eventQuery )
569+ && Objects .equals (this .formulas , changeWidgetRequest .formulas )
456570 && Objects .equals (this .increaseGood , changeWidgetRequest .increaseGood )
457571 && Objects .equals (this .logQuery , changeWidgetRequest .logQuery )
458572 && Objects .equals (this .networkQuery , changeWidgetRequest .networkQuery )
@@ -461,6 +575,8 @@ public boolean equals(Object o) {
461575 && Objects .equals (this .processQuery , changeWidgetRequest .processQuery )
462576 && Objects .equals (this .profileMetricsQuery , changeWidgetRequest .profileMetricsQuery )
463577 && Objects .equals (this .q , changeWidgetRequest .q )
578+ && Objects .equals (this .queries , changeWidgetRequest .queries )
579+ && Objects .equals (this .responseFormat , changeWidgetRequest .responseFormat )
464580 && Objects .equals (this .rumQuery , changeWidgetRequest .rumQuery )
465581 && Objects .equals (this .securityQuery , changeWidgetRequest .securityQuery )
466582 && Objects .equals (this .showPresent , changeWidgetRequest .showPresent );
@@ -473,6 +589,7 @@ public int hashCode() {
473589 changeType ,
474590 compareTo ,
475591 eventQuery ,
592+ formulas ,
476593 increaseGood ,
477594 logQuery ,
478595 networkQuery ,
@@ -481,6 +598,8 @@ public int hashCode() {
481598 processQuery ,
482599 profileMetricsQuery ,
483600 q ,
601+ queries ,
602+ responseFormat ,
484603 rumQuery ,
485604 securityQuery ,
486605 showPresent );
@@ -494,6 +613,7 @@ public String toString() {
494613 sb .append (" changeType: " ).append (toIndentedString (changeType )).append ("\n " );
495614 sb .append (" compareTo: " ).append (toIndentedString (compareTo )).append ("\n " );
496615 sb .append (" eventQuery: " ).append (toIndentedString (eventQuery )).append ("\n " );
616+ sb .append (" formulas: " ).append (toIndentedString (formulas )).append ("\n " );
497617 sb .append (" increaseGood: " ).append (toIndentedString (increaseGood )).append ("\n " );
498618 sb .append (" logQuery: " ).append (toIndentedString (logQuery )).append ("\n " );
499619 sb .append (" networkQuery: " ).append (toIndentedString (networkQuery )).append ("\n " );
@@ -504,6 +624,8 @@ public String toString() {
504624 .append (toIndentedString (profileMetricsQuery ))
505625 .append ("\n " );
506626 sb .append (" q: " ).append (toIndentedString (q )).append ("\n " );
627+ sb .append (" queries: " ).append (toIndentedString (queries )).append ("\n " );
628+ sb .append (" responseFormat: " ).append (toIndentedString (responseFormat )).append ("\n " );
507629 sb .append (" rumQuery: " ).append (toIndentedString (rumQuery )).append ("\n " );
508630 sb .append (" securityQuery: " ).append (toIndentedString (securityQuery )).append ("\n " );
509631 sb .append (" showPresent: " ).append (toIndentedString (showPresent )).append ("\n " );
0 commit comments