Skip to content

Commit f914b02

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
OP make 'support_rules' field in parse_grok processor optional (#3017)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent f535408 commit f914b02

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "a6f5281",
3-
"generated": "2025-08-06 17:44:35.840"
2+
"spec_repo_commit": "befda92",
3+
"generated": "2025-08-06 19:12:57.307"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28224,7 +28224,6 @@ components:
2822428224
required:
2822528225
- source
2822628226
- match_rules
28227-
- support_rules
2822828227
type: object
2822928228
ObservabilityPipelineParseGrokProcessorRuleMatchRule:
2823028229
description: 'Defines a Grok parsing rule, which extracts structured fields

src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineParseGrokProcessorRule.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)