@@ -47,7 +47,7 @@ public class FormulaAndFunctionApmResourceStatsQueryDefinition {
4747 private String env ;
4848
4949 public static final String JSON_PROPERTY_GROUP_BY = "group_by" ;
50- private List <String > groupBy = null ;
50+ private List <String > groupBy = new ArrayList <>() ;
5151
5252 public static final String JSON_PROPERTY_NAME = "name" ;
5353 private String name ;
@@ -77,14 +77,18 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition(
7777 @ JsonProperty (required = true , value = JSON_PROPERTY_DATA_SOURCE )
7878 FormulaAndFunctionApmResourceStatsDataSource dataSource ,
7979 @ JsonProperty (required = true , value = JSON_PROPERTY_ENV ) String env ,
80+ @ JsonProperty (required = true , value = JSON_PROPERTY_GROUP_BY ) List <String > groupBy ,
8081 @ JsonProperty (required = true , value = JSON_PROPERTY_NAME ) String name ,
82+ @ JsonProperty (required = true , value = JSON_PROPERTY_OPERATION_NAME ) String operationName ,
8183 @ JsonProperty (required = true , value = JSON_PROPERTY_SERVICE ) String service ,
8284 @ JsonProperty (required = true , value = JSON_PROPERTY_STAT )
8385 FormulaAndFunctionApmResourceStatName stat ) {
8486 this .dataSource = dataSource ;
8587 this .unparsed |= !dataSource .isValid ();
8688 this .env = env ;
89+ this .groupBy = groupBy ;
8790 this .name = name ;
91+ this .operationName = operationName ;
8892 this .service = service ;
8993 this .stat = stat ;
9094 this .unparsed |= !stat .isValid ();
@@ -172,9 +176,6 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition groupBy(List<String> gr
172176 }
173177
174178 public FormulaAndFunctionApmResourceStatsQueryDefinition addGroupByItem (String groupByItem ) {
175- if (this .groupBy == null ) {
176- this .groupBy = new ArrayList <>();
177- }
178179 this .groupBy .add (groupByItem );
179180 return this ;
180181 }
@@ -184,9 +185,8 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition addGroupByItem(String g
184185 *
185186 * @return groupBy
186187 */
187- @ jakarta .annotation .Nullable
188188 @ JsonProperty (JSON_PROPERTY_GROUP_BY )
189- @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
189+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
190190 public List <String > getGroupBy () {
191191 return groupBy ;
192192 }
@@ -225,9 +225,8 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition operationName(String op
225225 *
226226 * @return operationName
227227 */
228- @ jakarta .annotation .Nullable
229228 @ JsonProperty (JSON_PROPERTY_OPERATION_NAME )
230- @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
229+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
231230 public String getOperationName () {
232231 return operationName ;
233232 }
0 commit comments