@@ -22,6 +22,8 @@ type ObservabilityPipelineOcsfMapperProcessor struct {
2222 Id string `json:"id"`
2323 // A Datadog search query used to determine which logs this processor targets.
2424 Include string `json:"include"`
25+ // Whether to keep an event that does not match any of the mapping filters.
26+ KeepUnmatched * bool `json:"keep_unmatched,omitempty"`
2527 // A list of mapping rules to convert events to the OCSF format.
2628 Mappings []ObservabilityPipelineOcsfMapperProcessorMapping `json:"mappings"`
2729 // The processor type. The value should always be `ocsf_mapper`.
@@ -152,6 +154,34 @@ func (o *ObservabilityPipelineOcsfMapperProcessor) SetInclude(v string) {
152154 o .Include = v
153155}
154156
157+ // GetKeepUnmatched returns the KeepUnmatched field value if set, zero value otherwise.
158+ func (o * ObservabilityPipelineOcsfMapperProcessor ) GetKeepUnmatched () bool {
159+ if o == nil || o .KeepUnmatched == nil {
160+ var ret bool
161+ return ret
162+ }
163+ return * o .KeepUnmatched
164+ }
165+
166+ // GetKeepUnmatchedOk returns a tuple with the KeepUnmatched field value if set, nil otherwise
167+ // and a boolean to check if the value has been set.
168+ func (o * ObservabilityPipelineOcsfMapperProcessor ) GetKeepUnmatchedOk () (* bool , bool ) {
169+ if o == nil || o .KeepUnmatched == nil {
170+ return nil , false
171+ }
172+ return o .KeepUnmatched , true
173+ }
174+
175+ // HasKeepUnmatched returns a boolean if a field has been set.
176+ func (o * ObservabilityPipelineOcsfMapperProcessor ) HasKeepUnmatched () bool {
177+ return o != nil && o .KeepUnmatched != nil
178+ }
179+
180+ // SetKeepUnmatched gets a reference to the given bool and assigns it to the KeepUnmatched field.
181+ func (o * ObservabilityPipelineOcsfMapperProcessor ) SetKeepUnmatched (v bool ) {
182+ o .KeepUnmatched = & v
183+ }
184+
155185// GetMappings returns the Mappings field value.
156186func (o * ObservabilityPipelineOcsfMapperProcessor ) GetMappings () []ObservabilityPipelineOcsfMapperProcessorMapping {
157187 if o == nil {
@@ -210,6 +240,9 @@ func (o ObservabilityPipelineOcsfMapperProcessor) MarshalJSON() ([]byte, error)
210240 toSerialize ["enabled" ] = o .Enabled
211241 toSerialize ["id" ] = o .Id
212242 toSerialize ["include" ] = o .Include
243+ if o .KeepUnmatched != nil {
244+ toSerialize ["keep_unmatched" ] = o .KeepUnmatched
245+ }
213246 toSerialize ["mappings" ] = o .Mappings
214247 toSerialize ["type" ] = o .Type
215248
@@ -222,12 +255,13 @@ func (o ObservabilityPipelineOcsfMapperProcessor) MarshalJSON() ([]byte, error)
222255// UnmarshalJSON deserializes the given payload.
223256func (o * ObservabilityPipelineOcsfMapperProcessor ) UnmarshalJSON (bytes []byte ) (err error ) {
224257 all := struct {
225- DisplayName * string `json:"display_name,omitempty"`
226- Enabled * bool `json:"enabled"`
227- Id * string `json:"id"`
228- Include * string `json:"include"`
229- Mappings * []ObservabilityPipelineOcsfMapperProcessorMapping `json:"mappings"`
230- Type * ObservabilityPipelineOcsfMapperProcessorType `json:"type"`
258+ DisplayName * string `json:"display_name,omitempty"`
259+ Enabled * bool `json:"enabled"`
260+ Id * string `json:"id"`
261+ Include * string `json:"include"`
262+ KeepUnmatched * bool `json:"keep_unmatched,omitempty"`
263+ Mappings * []ObservabilityPipelineOcsfMapperProcessorMapping `json:"mappings"`
264+ Type * ObservabilityPipelineOcsfMapperProcessorType `json:"type"`
231265 }{}
232266 if err = datadog .Unmarshal (bytes , & all ); err != nil {
233267 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -249,7 +283,7 @@ func (o *ObservabilityPipelineOcsfMapperProcessor) UnmarshalJSON(bytes []byte) (
249283 }
250284 additionalProperties := make (map [string ]interface {})
251285 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
252- datadog .DeleteKeys (additionalProperties , & []string {"display_name" , "enabled" , "id" , "include" , "mappings" , "type" })
286+ datadog .DeleteKeys (additionalProperties , & []string {"display_name" , "enabled" , "id" , "include" , "keep_unmatched" , " mappings" , "type" })
253287 } else {
254288 return err
255289 }
@@ -259,6 +293,7 @@ func (o *ObservabilityPipelineOcsfMapperProcessor) UnmarshalJSON(bytes []byte) (
259293 o .Enabled = * all .Enabled
260294 o .Id = * all .Id
261295 o .Include = * all .Include
296+ o .KeepUnmatched = all .KeepUnmatched
262297 o .Mappings = * all .Mappings
263298 if ! all .Type .IsValid () {
264299 hasInvalidField = true
0 commit comments