@@ -14,6 +14,8 @@ import (
1414//
1515// **Supported pipeline types:** logs
1616type ObservabilityPipelineDedupeProcessor struct {
17+ // Configuration for the cache used to detect duplicates.
18+ Cache * ObservabilityPipelineDedupeProcessorCache `json:"cache,omitempty"`
1719 // The display name for a component.
1820 DisplayName * string `json:"display_name,omitempty"`
1921 // Indicates whether the processor is enabled.
@@ -58,6 +60,34 @@ func NewObservabilityPipelineDedupeProcessorWithDefaults() *ObservabilityPipelin
5860 return & this
5961}
6062
63+ // GetCache returns the Cache field value if set, zero value otherwise.
64+ func (o * ObservabilityPipelineDedupeProcessor ) GetCache () ObservabilityPipelineDedupeProcessorCache {
65+ if o == nil || o .Cache == nil {
66+ var ret ObservabilityPipelineDedupeProcessorCache
67+ return ret
68+ }
69+ return * o .Cache
70+ }
71+
72+ // GetCacheOk returns a tuple with the Cache field value if set, nil otherwise
73+ // and a boolean to check if the value has been set.
74+ func (o * ObservabilityPipelineDedupeProcessor ) GetCacheOk () (* ObservabilityPipelineDedupeProcessorCache , bool ) {
75+ if o == nil || o .Cache == nil {
76+ return nil , false
77+ }
78+ return o .Cache , true
79+ }
80+
81+ // HasCache returns a boolean if a field has been set.
82+ func (o * ObservabilityPipelineDedupeProcessor ) HasCache () bool {
83+ return o != nil && o .Cache != nil
84+ }
85+
86+ // SetCache gets a reference to the given ObservabilityPipelineDedupeProcessorCache and assigns it to the Cache field.
87+ func (o * ObservabilityPipelineDedupeProcessor ) SetCache (v ObservabilityPipelineDedupeProcessorCache ) {
88+ o .Cache = & v
89+ }
90+
6191// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
6292func (o * ObservabilityPipelineDedupeProcessor ) GetDisplayName () string {
6393 if o == nil || o .DisplayName == nil {
@@ -230,6 +260,9 @@ func (o ObservabilityPipelineDedupeProcessor) MarshalJSON() ([]byte, error) {
230260 if o .UnparsedObject != nil {
231261 return datadog .Marshal (o .UnparsedObject )
232262 }
263+ if o .Cache != nil {
264+ toSerialize ["cache" ] = o .Cache
265+ }
233266 if o .DisplayName != nil {
234267 toSerialize ["display_name" ] = o .DisplayName
235268 }
@@ -249,13 +282,14 @@ func (o ObservabilityPipelineDedupeProcessor) MarshalJSON() ([]byte, error) {
249282// UnmarshalJSON deserializes the given payload.
250283func (o * ObservabilityPipelineDedupeProcessor ) UnmarshalJSON (bytes []byte ) (err error ) {
251284 all := struct {
252- DisplayName * string `json:"display_name,omitempty"`
253- Enabled * bool `json:"enabled"`
254- Fields * []string `json:"fields"`
255- Id * string `json:"id"`
256- Include * string `json:"include"`
257- Mode * ObservabilityPipelineDedupeProcessorMode `json:"mode"`
258- Type * ObservabilityPipelineDedupeProcessorType `json:"type"`
285+ Cache * ObservabilityPipelineDedupeProcessorCache `json:"cache,omitempty"`
286+ DisplayName * string `json:"display_name,omitempty"`
287+ Enabled * bool `json:"enabled"`
288+ Fields * []string `json:"fields"`
289+ Id * string `json:"id"`
290+ Include * string `json:"include"`
291+ Mode * ObservabilityPipelineDedupeProcessorMode `json:"mode"`
292+ Type * ObservabilityPipelineDedupeProcessorType `json:"type"`
259293 }{}
260294 if err = datadog .Unmarshal (bytes , & all ); err != nil {
261295 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -280,12 +314,16 @@ func (o *ObservabilityPipelineDedupeProcessor) UnmarshalJSON(bytes []byte) (err
280314 }
281315 additionalProperties := make (map [string ]interface {})
282316 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
283- datadog .DeleteKeys (additionalProperties , & []string {"display_name" , "enabled" , "fields" , "id" , "include" , "mode" , "type" })
317+ datadog .DeleteKeys (additionalProperties , & []string {"cache" , " display_name" , "enabled" , "fields" , "id" , "include" , "mode" , "type" })
284318 } else {
285319 return err
286320 }
287321
288322 hasInvalidField := false
323+ if all .Cache != nil && all .Cache .UnparsedObject != nil && o .UnparsedObject == nil {
324+ hasInvalidField = true
325+ }
326+ o .Cache = all .Cache
289327 o .DisplayName = all .DisplayName
290328 o .Enabled = * all .Enabled
291329 o .Fields = * all .Fields
0 commit comments