@@ -27,6 +27,8 @@ type ObservabilityPipelineSplunkHecDestination struct {
2727 Id string `json:"id"`
2828 // Optional name of the Splunk index where logs are written.
2929 Index * string `json:"index,omitempty"`
30+ // List of log field names to send as indexed fields to Splunk HEC. Available only when `encoding` is `json`.
31+ IndexedFields []string `json:"indexed_fields,omitempty"`
3032 // A list of component IDs whose output is used as the `input` for this component.
3133 Inputs []string `json:"inputs"`
3234 // The Splunk sourcetype to assign to log events.
@@ -225,6 +227,34 @@ func (o *ObservabilityPipelineSplunkHecDestination) SetIndex(v string) {
225227 o .Index = & v
226228}
227229
230+ // GetIndexedFields returns the IndexedFields field value if set, zero value otherwise.
231+ func (o * ObservabilityPipelineSplunkHecDestination ) GetIndexedFields () []string {
232+ if o == nil || o .IndexedFields == nil {
233+ var ret []string
234+ return ret
235+ }
236+ return o .IndexedFields
237+ }
238+
239+ // GetIndexedFieldsOk returns a tuple with the IndexedFields field value if set, nil otherwise
240+ // and a boolean to check if the value has been set.
241+ func (o * ObservabilityPipelineSplunkHecDestination ) GetIndexedFieldsOk () (* []string , bool ) {
242+ if o == nil || o .IndexedFields == nil {
243+ return nil , false
244+ }
245+ return & o .IndexedFields , true
246+ }
247+
248+ // HasIndexedFields returns a boolean if a field has been set.
249+ func (o * ObservabilityPipelineSplunkHecDestination ) HasIndexedFields () bool {
250+ return o != nil && o .IndexedFields != nil
251+ }
252+
253+ // SetIndexedFields gets a reference to the given []string and assigns it to the IndexedFields field.
254+ func (o * ObservabilityPipelineSplunkHecDestination ) SetIndexedFields (v []string ) {
255+ o .IndexedFields = v
256+ }
257+
228258// GetInputs returns the Inputs field value.
229259func (o * ObservabilityPipelineSplunkHecDestination ) GetInputs () []string {
230260 if o == nil {
@@ -349,6 +379,9 @@ func (o ObservabilityPipelineSplunkHecDestination) MarshalJSON() ([]byte, error)
349379 if o .Index != nil {
350380 toSerialize ["index" ] = o .Index
351381 }
382+ if o .IndexedFields != nil {
383+ toSerialize ["indexed_fields" ] = o .IndexedFields
384+ }
352385 toSerialize ["inputs" ] = o .Inputs
353386 if o .Sourcetype != nil {
354387 toSerialize ["sourcetype" ] = o .Sourcetype
@@ -373,6 +406,7 @@ func (o *ObservabilityPipelineSplunkHecDestination) UnmarshalJSON(bytes []byte)
373406 EndpointUrlKey * string `json:"endpoint_url_key,omitempty"`
374407 Id * string `json:"id"`
375408 Index * string `json:"index,omitempty"`
409+ IndexedFields []string `json:"indexed_fields,omitempty"`
376410 Inputs * []string `json:"inputs"`
377411 Sourcetype * string `json:"sourcetype,omitempty"`
378412 TokenKey * string `json:"token_key,omitempty"`
@@ -392,7 +426,7 @@ func (o *ObservabilityPipelineSplunkHecDestination) UnmarshalJSON(bytes []byte)
392426 }
393427 additionalProperties := make (map [string ]interface {})
394428 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
395- datadog .DeleteKeys (additionalProperties , & []string {"auto_extract_timestamp" , "buffer" , "encoding" , "endpoint_url_key" , "id" , "index" , "inputs" , "sourcetype" , "token_key" , "type" })
429+ datadog .DeleteKeys (additionalProperties , & []string {"auto_extract_timestamp" , "buffer" , "encoding" , "endpoint_url_key" , "id" , "index" , "indexed_fields" , " inputs" , "sourcetype" , "token_key" , "type" })
396430 } else {
397431 return err
398432 }
@@ -408,6 +442,7 @@ func (o *ObservabilityPipelineSplunkHecDestination) UnmarshalJSON(bytes []byte)
408442 o .EndpointUrlKey = all .EndpointUrlKey
409443 o .Id = * all .Id
410444 o .Index = all .Index
445+ o .IndexedFields = all .IndexedFields
411446 o .Inputs = * all .Inputs
412447 o .Sourcetype = all .Sourcetype
413448 o .TokenKey = all .TokenKey
0 commit comments