@@ -18,6 +18,8 @@ type ObservabilityPipelineConfig struct {
1818 Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"`
1919 // A list of configured data sources for the pipeline.
2020 Sources []ObservabilityPipelineConfigSourceItem `json:"sources"`
21+ // Use this field to configure the pipeline's filter queries to use the deprecated search syntax.
22+ UseLegacySearchSyntax * bool `json:"use_legacy_search_syntax,omitempty"`
2123 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2224 UnparsedObject map [string ]interface {} `json:"-"`
2325 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -116,6 +118,34 @@ func (o *ObservabilityPipelineConfig) SetSources(v []ObservabilityPipelineConfig
116118 o .Sources = v
117119}
118120
121+ // GetUseLegacySearchSyntax returns the UseLegacySearchSyntax field value if set, zero value otherwise.
122+ func (o * ObservabilityPipelineConfig ) GetUseLegacySearchSyntax () bool {
123+ if o == nil || o .UseLegacySearchSyntax == nil {
124+ var ret bool
125+ return ret
126+ }
127+ return * o .UseLegacySearchSyntax
128+ }
129+
130+ // GetUseLegacySearchSyntaxOk returns a tuple with the UseLegacySearchSyntax field value if set, nil otherwise
131+ // and a boolean to check if the value has been set.
132+ func (o * ObservabilityPipelineConfig ) GetUseLegacySearchSyntaxOk () (* bool , bool ) {
133+ if o == nil || o .UseLegacySearchSyntax == nil {
134+ return nil , false
135+ }
136+ return o .UseLegacySearchSyntax , true
137+ }
138+
139+ // HasUseLegacySearchSyntax returns a boolean if a field has been set.
140+ func (o * ObservabilityPipelineConfig ) HasUseLegacySearchSyntax () bool {
141+ return o != nil && o .UseLegacySearchSyntax != nil
142+ }
143+
144+ // SetUseLegacySearchSyntax gets a reference to the given bool and assigns it to the UseLegacySearchSyntax field.
145+ func (o * ObservabilityPipelineConfig ) SetUseLegacySearchSyntax (v bool ) {
146+ o .UseLegacySearchSyntax = & v
147+ }
148+
119149// MarshalJSON serializes the struct using spec logic.
120150func (o ObservabilityPipelineConfig ) MarshalJSON () ([]byte , error ) {
121151 toSerialize := map [string ]interface {}{}
@@ -127,6 +157,9 @@ func (o ObservabilityPipelineConfig) MarshalJSON() ([]byte, error) {
127157 toSerialize ["processors" ] = o .Processors
128158 }
129159 toSerialize ["sources" ] = o .Sources
160+ if o .UseLegacySearchSyntax != nil {
161+ toSerialize ["use_legacy_search_syntax" ] = o .UseLegacySearchSyntax
162+ }
130163
131164 for key , value := range o .AdditionalProperties {
132165 toSerialize [key ] = value
@@ -137,9 +170,10 @@ func (o ObservabilityPipelineConfig) MarshalJSON() ([]byte, error) {
137170// UnmarshalJSON deserializes the given payload.
138171func (o * ObservabilityPipelineConfig ) UnmarshalJSON (bytes []byte ) (err error ) {
139172 all := struct {
140- Destinations * []ObservabilityPipelineConfigDestinationItem `json:"destinations"`
141- Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"`
142- Sources * []ObservabilityPipelineConfigSourceItem `json:"sources"`
173+ Destinations * []ObservabilityPipelineConfigDestinationItem `json:"destinations"`
174+ Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"`
175+ Sources * []ObservabilityPipelineConfigSourceItem `json:"sources"`
176+ UseLegacySearchSyntax * bool `json:"use_legacy_search_syntax,omitempty"`
143177 }{}
144178 if err = datadog .Unmarshal (bytes , & all ); err != nil {
145179 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -152,13 +186,14 @@ func (o *ObservabilityPipelineConfig) UnmarshalJSON(bytes []byte) (err error) {
152186 }
153187 additionalProperties := make (map [string ]interface {})
154188 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
155- datadog .DeleteKeys (additionalProperties , & []string {"destinations" , "processors" , "sources" })
189+ datadog .DeleteKeys (additionalProperties , & []string {"destinations" , "processors" , "sources" , "use_legacy_search_syntax" })
156190 } else {
157191 return err
158192 }
159193 o .Destinations = * all .Destinations
160194 o .Processors = all .Processors
161195 o .Sources = * all .Sources
196+ o .UseLegacySearchSyntax = all .UseLegacySearchSyntax
162197
163198 if len (additionalProperties ) > 0 {
164199 o .AdditionalProperties = additionalProperties
0 commit comments