Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "f391bf6",
"generated": "2025-08-06 15:15:49.158"
"spec_repo_commit": "befda92",
"generated": "2025-08-06 19:12:53.581"
}
7 changes: 5 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28224,7 +28224,6 @@ components:
required:
- source
- match_rules
- support_rules
type: object
ObservabilityPipelineParseGrokProcessorRuleMatchRule:
description: 'Defines a Grok parsing rule, which extracts structured fields
Expand Down Expand Up @@ -33749,7 +33748,7 @@ components:
rule types application_code_vulnerability,

application_library_vulnerability, attack_path, container_image_vulnerability,
identity_risk, misconfiguration, and api_security.'
identity_risk, misconfiguration, api_security, host_vulnerability and iac_misconfiguration.'
enum:
- application_security
- log_detection
Expand All @@ -33764,6 +33763,8 @@ components:
- identity_risk
- misconfiguration
- api_security
- host_vulnerability
- iac_misconfiguration
type: string
x-enum-varnames:
- APPLICATION_SECURITY
Expand All @@ -33779,6 +33780,8 @@ components:
- IDENTITY_RISK
- MISCONFIGURATION
- API_SECURITY
- HOST_VULNERABILITY
- IAC_MISCONFIGURATION
RuleUser:
description: User creating or modifying a rule.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type ObservabilityPipelineParseGrokProcessorRule struct {
Source string `json:"source"`
// A list of Grok helper rules that can be referenced by the parsing rules.
//
SupportRules []ObservabilityPipelineParseGrokProcessorRuleSupportRule `json:"support_rules"`
SupportRules []ObservabilityPipelineParseGrokProcessorRuleSupportRule `json:"support_rules,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand All @@ -31,11 +31,10 @@ type ObservabilityPipelineParseGrokProcessorRule struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed.
func NewObservabilityPipelineParseGrokProcessorRule(matchRules []ObservabilityPipelineParseGrokProcessorRuleMatchRule, source string, supportRules []ObservabilityPipelineParseGrokProcessorRuleSupportRule) *ObservabilityPipelineParseGrokProcessorRule {
func NewObservabilityPipelineParseGrokProcessorRule(matchRules []ObservabilityPipelineParseGrokProcessorRuleMatchRule, source string) *ObservabilityPipelineParseGrokProcessorRule {
this := ObservabilityPipelineParseGrokProcessorRule{}
this.MatchRules = matchRules
this.Source = source
this.SupportRules = supportRules
return &this
}

Expand Down Expand Up @@ -93,25 +92,30 @@ func (o *ObservabilityPipelineParseGrokProcessorRule) SetSource(v string) {
o.Source = v
}

// GetSupportRules returns the SupportRules field value.
// GetSupportRules returns the SupportRules field value if set, zero value otherwise.
func (o *ObservabilityPipelineParseGrokProcessorRule) GetSupportRules() []ObservabilityPipelineParseGrokProcessorRuleSupportRule {
if o == nil {
if o == nil || o.SupportRules == nil {
var ret []ObservabilityPipelineParseGrokProcessorRuleSupportRule
return ret
}
return o.SupportRules
}

// GetSupportRulesOk returns a tuple with the SupportRules field value
// GetSupportRulesOk returns a tuple with the SupportRules field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ObservabilityPipelineParseGrokProcessorRule) GetSupportRulesOk() (*[]ObservabilityPipelineParseGrokProcessorRuleSupportRule, bool) {
if o == nil {
if o == nil || o.SupportRules == nil {
return nil, false
}
return &o.SupportRules, true
}

// SetSupportRules sets field value.
// HasSupportRules returns a boolean if a field has been set.
func (o *ObservabilityPipelineParseGrokProcessorRule) HasSupportRules() bool {
return o != nil && o.SupportRules != nil
}

// SetSupportRules gets a reference to the given []ObservabilityPipelineParseGrokProcessorRuleSupportRule and assigns it to the SupportRules field.
func (o *ObservabilityPipelineParseGrokProcessorRule) SetSupportRules(v []ObservabilityPipelineParseGrokProcessorRuleSupportRule) {
o.SupportRules = v
}
Expand All @@ -124,7 +128,9 @@ func (o ObservabilityPipelineParseGrokProcessorRule) MarshalJSON() ([]byte, erro
}
toSerialize["match_rules"] = o.MatchRules
toSerialize["source"] = o.Source
toSerialize["support_rules"] = o.SupportRules
if o.SupportRules != nil {
toSerialize["support_rules"] = o.SupportRules
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand All @@ -135,9 +141,9 @@ func (o ObservabilityPipelineParseGrokProcessorRule) MarshalJSON() ([]byte, erro
// UnmarshalJSON deserializes the given payload.
func (o *ObservabilityPipelineParseGrokProcessorRule) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
MatchRules *[]ObservabilityPipelineParseGrokProcessorRuleMatchRule `json:"match_rules"`
Source *string `json:"source"`
SupportRules *[]ObservabilityPipelineParseGrokProcessorRuleSupportRule `json:"support_rules"`
MatchRules *[]ObservabilityPipelineParseGrokProcessorRuleMatchRule `json:"match_rules"`
Source *string `json:"source"`
SupportRules []ObservabilityPipelineParseGrokProcessorRuleSupportRule `json:"support_rules,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
Expand All @@ -148,9 +154,6 @@ func (o *ObservabilityPipelineParseGrokProcessorRule) UnmarshalJSON(bytes []byte
if all.Source == nil {
return fmt.Errorf("required field source missing")
}
if all.SupportRules == nil {
return fmt.Errorf("required field support_rules missing")
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"match_rules", "source", "support_rules"})
Expand All @@ -159,7 +162,7 @@ func (o *ObservabilityPipelineParseGrokProcessorRule) UnmarshalJSON(bytes []byte
}
o.MatchRules = *all.MatchRules
o.Source = *all.Source
o.SupportRules = *all.SupportRules
o.SupportRules = all.SupportRules

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
6 changes: 5 additions & 1 deletion api/datadogV2/model_rule_types_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// Signal-based notification rules can filter signals based on rule types application_security, log_detection,
// workload_security, signal_correlation, cloud_configuration and infrastructure_configuration.
// Vulnerability-based notification rules can filter vulnerabilities based on rule types application_code_vulnerability,
// application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, and api_security.
// application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, api_security, host_vulnerability and iac_misconfiguration.
type RuleTypesItems string

// List of RuleTypesItems.
Expand All @@ -32,6 +32,8 @@ const (
RULETYPESITEMS_IDENTITY_RISK RuleTypesItems = "identity_risk"
RULETYPESITEMS_MISCONFIGURATION RuleTypesItems = "misconfiguration"
RULETYPESITEMS_API_SECURITY RuleTypesItems = "api_security"
RULETYPESITEMS_HOST_VULNERABILITY RuleTypesItems = "host_vulnerability"
RULETYPESITEMS_IAC_MISCONFIGURATION RuleTypesItems = "iac_misconfiguration"
)

var allowedRuleTypesItemsEnumValues = []RuleTypesItems{
Expand All @@ -48,6 +50,8 @@ var allowedRuleTypesItemsEnumValues = []RuleTypesItems{
RULETYPESITEMS_IDENTITY_RISK,
RULETYPESITEMS_MISCONFIGURATION,
RULETYPESITEMS_API_SECURITY,
RULETYPESITEMS_HOST_VULNERABILITY,
RULETYPESITEMS_IAC_MISCONFIGURATION,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
Loading