@@ -39,21 +39,17 @@ public class ObservabilityPipelineParseGrokProcessorRule {
3939 private String source ;
4040
4141 public static final String JSON_PROPERTY_SUPPORT_RULES = "support_rules" ;
42- private List <ObservabilityPipelineParseGrokProcessorRuleSupportRule > supportRules =
43- new ArrayList <>();
42+ private List <ObservabilityPipelineParseGrokProcessorRuleSupportRule > supportRules = null ;
4443
4544 public ObservabilityPipelineParseGrokProcessorRule () {}
4645
4746 @ JsonCreator
4847 public ObservabilityPipelineParseGrokProcessorRule (
4948 @ JsonProperty (required = true , value = JSON_PROPERTY_MATCH_RULES )
5049 List <ObservabilityPipelineParseGrokProcessorRuleMatchRule > matchRules ,
51- @ JsonProperty (required = true , value = JSON_PROPERTY_SOURCE ) String source ,
52- @ JsonProperty (required = true , value = JSON_PROPERTY_SUPPORT_RULES )
53- List <ObservabilityPipelineParseGrokProcessorRuleSupportRule > supportRules ) {
50+ @ JsonProperty (required = true , value = JSON_PROPERTY_SOURCE ) String source ) {
5451 this .matchRules = matchRules ;
5552 this .source = source ;
56- this .supportRules = supportRules ;
5753 }
5854
5955 public ObservabilityPipelineParseGrokProcessorRule matchRules (
@@ -119,6 +115,9 @@ public ObservabilityPipelineParseGrokProcessorRule supportRules(
119115
120116 public ObservabilityPipelineParseGrokProcessorRule addSupportRulesItem (
121117 ObservabilityPipelineParseGrokProcessorRuleSupportRule supportRulesItem ) {
118+ if (this .supportRules == null ) {
119+ this .supportRules = new ArrayList <>();
120+ }
122121 this .supportRules .add (supportRulesItem );
123122 this .unparsed |= supportRulesItem .unparsed ;
124123 return this ;
@@ -129,8 +128,9 @@ public ObservabilityPipelineParseGrokProcessorRule addSupportRulesItem(
129128 *
130129 * @return supportRules
131130 */
131+ @ jakarta .annotation .Nullable
132132 @ JsonProperty (JSON_PROPERTY_SUPPORT_RULES )
133- @ JsonInclude (value = JsonInclude .Include .ALWAYS )
133+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
134134 public List <ObservabilityPipelineParseGrokProcessorRuleSupportRule > getSupportRules () {
135135 return supportRules ;
136136 }
0 commit comments