Skip to content

Commit f6ee52a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0008be2 of spec repo
1 parent 6be4c93 commit f6ee52a

26 files changed

+1148
-891
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 161 additions & 169 deletions
Large diffs are not rendered by default.

api/datadogV2/model_observability_pipeline_add_env_vars_processor.go

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212

1313
// ObservabilityPipelineAddEnvVarsProcessor The `add_env_vars` processor adds environment variable values to log events.
1414
type ObservabilityPipelineAddEnvVarsProcessor struct {
15+
// Whether this processor is enabled.
16+
Enabled bool `json:"enabled"`
1517
// The unique identifier for this component. Used to reference this processor in the pipeline.
1618
Id string `json:"id"`
1719
// A Datadog search query used to determine which logs this processor targets.
1820
Include string `json:"include"`
19-
// A list of component IDs whose output is used as the input for this processor.
20-
Inputs []string `json:"inputs"`
2121
// The processor type. The value should always be `add_env_vars`.
2222
Type ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
2323
// A list of environment variable mappings to apply to log fields.
@@ -31,11 +31,11 @@ type ObservabilityPipelineAddEnvVarsProcessor struct {
3131
// This constructor will assign default values to properties that have it defined,
3232
// and makes sure properties required by API are set, but the set of arguments
3333
// will change when the set of required properties is changed.
34-
func NewObservabilityPipelineAddEnvVarsProcessor(id string, include string, inputs []string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor {
34+
func NewObservabilityPipelineAddEnvVarsProcessor(enabled bool, id string, include string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor {
3535
this := ObservabilityPipelineAddEnvVarsProcessor{}
36+
this.Enabled = enabled
3637
this.Id = id
3738
this.Include = include
38-
this.Inputs = inputs
3939
this.Type = typeVar
4040
this.Variables = variables
4141
return &this
@@ -51,6 +51,29 @@ func NewObservabilityPipelineAddEnvVarsProcessorWithDefaults() *ObservabilityPip
5151
return &this
5252
}
5353

54+
// GetEnabled returns the Enabled field value.
55+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabled() bool {
56+
if o == nil {
57+
var ret bool
58+
return ret
59+
}
60+
return o.Enabled
61+
}
62+
63+
// GetEnabledOk returns a tuple with the Enabled field value
64+
// and a boolean to check if the value has been set.
65+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabledOk() (*bool, bool) {
66+
if o == nil {
67+
return nil, false
68+
}
69+
return &o.Enabled, true
70+
}
71+
72+
// SetEnabled sets field value.
73+
func (o *ObservabilityPipelineAddEnvVarsProcessor) SetEnabled(v bool) {
74+
o.Enabled = v
75+
}
76+
5477
// GetId returns the Id field value.
5578
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetId() string {
5679
if o == nil {
@@ -97,29 +120,6 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInclude(v string) {
97120
o.Include = v
98121
}
99122

100-
// GetInputs returns the Inputs field value.
101-
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputs() []string {
102-
if o == nil {
103-
var ret []string
104-
return ret
105-
}
106-
return o.Inputs
107-
}
108-
109-
// GetInputsOk returns a tuple with the Inputs field value
110-
// and a boolean to check if the value has been set.
111-
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputsOk() (*[]string, bool) {
112-
if o == nil {
113-
return nil, false
114-
}
115-
return &o.Inputs, true
116-
}
117-
118-
// SetInputs sets field value.
119-
func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInputs(v []string) {
120-
o.Inputs = v
121-
}
122-
123123
// GetType returns the Type field value.
124124
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetType() ObservabilityPipelineAddEnvVarsProcessorType {
125125
if o == nil {
@@ -172,9 +172,9 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
172172
if o.UnparsedObject != nil {
173173
return datadog.Marshal(o.UnparsedObject)
174174
}
175+
toSerialize["enabled"] = o.Enabled
175176
toSerialize["id"] = o.Id
176177
toSerialize["include"] = o.Include
177-
toSerialize["inputs"] = o.Inputs
178178
toSerialize["type"] = o.Type
179179
toSerialize["variables"] = o.Variables
180180

@@ -187,24 +187,24 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
187187
// UnmarshalJSON deserializes the given payload.
188188
func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189189
all := struct {
190+
Enabled *bool `json:"enabled"`
190191
Id *string `json:"id"`
191192
Include *string `json:"include"`
192-
Inputs *[]string `json:"inputs"`
193193
Type *ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
194194
Variables *[]ObservabilityPipelineAddEnvVarsProcessorVariable `json:"variables"`
195195
}{}
196196
if err = datadog.Unmarshal(bytes, &all); err != nil {
197197
return datadog.Unmarshal(bytes, &o.UnparsedObject)
198198
}
199+
if all.Enabled == nil {
200+
return fmt.Errorf("required field enabled missing")
201+
}
199202
if all.Id == nil {
200203
return fmt.Errorf("required field id missing")
201204
}
202205
if all.Include == nil {
203206
return fmt.Errorf("required field include missing")
204207
}
205-
if all.Inputs == nil {
206-
return fmt.Errorf("required field inputs missing")
207-
}
208208
if all.Type == nil {
209209
return fmt.Errorf("required field type missing")
210210
}
@@ -213,15 +213,15 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (
213213
}
214214
additionalProperties := make(map[string]interface{})
215215
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "type", "variables"})
216+
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "type", "variables"})
217217
} else {
218218
return err
219219
}
220220

221221
hasInvalidField := false
222+
o.Enabled = *all.Enabled
222223
o.Id = *all.Id
223224
o.Include = *all.Include
224-
o.Inputs = *all.Inputs
225225
if !all.Type.IsValid() {
226226
hasInvalidField = true
227227
} else {

api/datadogV2/model_observability_pipeline_add_fields_processor.go

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import (
1212

1313
// ObservabilityPipelineAddFieldsProcessor The `add_fields` processor adds static key-value fields to logs.
1414
type ObservabilityPipelineAddFieldsProcessor struct {
15+
// Whether this processor is enabled.
16+
Enabled bool `json:"enabled"`
1517
// A list of static fields (key-value pairs) that is added to each log event processed by this component.
1618
Fields []ObservabilityPipelineFieldValue `json:"fields"`
1719
// The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components).
1820
Id string `json:"id"`
1921
// A Datadog search query used to determine which logs this processor targets.
2022
Include string `json:"include"`
21-
// A list of component IDs whose output is used as the `input` for this component.
22-
Inputs []string `json:"inputs"`
2323
// The processor type. The value should always be `add_fields`.
2424
Type ObservabilityPipelineAddFieldsProcessorType `json:"type"`
2525
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -31,12 +31,12 @@ type ObservabilityPipelineAddFieldsProcessor struct {
3131
// This constructor will assign default values to properties that have it defined,
3232
// and makes sure properties required by API are set, but the set of arguments
3333
// will change when the set of required properties is changed.
34-
func NewObservabilityPipelineAddFieldsProcessor(fields []ObservabilityPipelineFieldValue, id string, include string, inputs []string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor {
34+
func NewObservabilityPipelineAddFieldsProcessor(enabled bool, fields []ObservabilityPipelineFieldValue, id string, include string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor {
3535
this := ObservabilityPipelineAddFieldsProcessor{}
36+
this.Enabled = enabled
3637
this.Fields = fields
3738
this.Id = id
3839
this.Include = include
39-
this.Inputs = inputs
4040
this.Type = typeVar
4141
return &this
4242
}
@@ -51,6 +51,29 @@ func NewObservabilityPipelineAddFieldsProcessorWithDefaults() *ObservabilityPipe
5151
return &this
5252
}
5353

54+
// GetEnabled returns the Enabled field value.
55+
func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabled() bool {
56+
if o == nil {
57+
var ret bool
58+
return ret
59+
}
60+
return o.Enabled
61+
}
62+
63+
// GetEnabledOk returns a tuple with the Enabled field value
64+
// and a boolean to check if the value has been set.
65+
func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabledOk() (*bool, bool) {
66+
if o == nil {
67+
return nil, false
68+
}
69+
return &o.Enabled, true
70+
}
71+
72+
// SetEnabled sets field value.
73+
func (o *ObservabilityPipelineAddFieldsProcessor) SetEnabled(v bool) {
74+
o.Enabled = v
75+
}
76+
5477
// GetFields returns the Fields field value.
5578
func (o *ObservabilityPipelineAddFieldsProcessor) GetFields() []ObservabilityPipelineFieldValue {
5679
if o == nil {
@@ -120,29 +143,6 @@ func (o *ObservabilityPipelineAddFieldsProcessor) SetInclude(v string) {
120143
o.Include = v
121144
}
122145

123-
// GetInputs returns the Inputs field value.
124-
func (o *ObservabilityPipelineAddFieldsProcessor) GetInputs() []string {
125-
if o == nil {
126-
var ret []string
127-
return ret
128-
}
129-
return o.Inputs
130-
}
131-
132-
// GetInputsOk returns a tuple with the Inputs field value
133-
// and a boolean to check if the value has been set.
134-
func (o *ObservabilityPipelineAddFieldsProcessor) GetInputsOk() (*[]string, bool) {
135-
if o == nil {
136-
return nil, false
137-
}
138-
return &o.Inputs, true
139-
}
140-
141-
// SetInputs sets field value.
142-
func (o *ObservabilityPipelineAddFieldsProcessor) SetInputs(v []string) {
143-
o.Inputs = v
144-
}
145-
146146
// GetType returns the Type field value.
147147
func (o *ObservabilityPipelineAddFieldsProcessor) GetType() ObservabilityPipelineAddFieldsProcessorType {
148148
if o == nil {
@@ -172,10 +172,10 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
172172
if o.UnparsedObject != nil {
173173
return datadog.Marshal(o.UnparsedObject)
174174
}
175+
toSerialize["enabled"] = o.Enabled
175176
toSerialize["fields"] = o.Fields
176177
toSerialize["id"] = o.Id
177178
toSerialize["include"] = o.Include
178-
toSerialize["inputs"] = o.Inputs
179179
toSerialize["type"] = o.Type
180180

181181
for key, value := range o.AdditionalProperties {
@@ -187,15 +187,18 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
187187
// UnmarshalJSON deserializes the given payload.
188188
func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189189
all := struct {
190+
Enabled *bool `json:"enabled"`
190191
Fields *[]ObservabilityPipelineFieldValue `json:"fields"`
191192
Id *string `json:"id"`
192193
Include *string `json:"include"`
193-
Inputs *[]string `json:"inputs"`
194194
Type *ObservabilityPipelineAddFieldsProcessorType `json:"type"`
195195
}{}
196196
if err = datadog.Unmarshal(bytes, &all); err != nil {
197197
return datadog.Unmarshal(bytes, &o.UnparsedObject)
198198
}
199+
if all.Enabled == nil {
200+
return fmt.Errorf("required field enabled missing")
201+
}
199202
if all.Fields == nil {
200203
return fmt.Errorf("required field fields missing")
201204
}
@@ -205,24 +208,21 @@ func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (e
205208
if all.Include == nil {
206209
return fmt.Errorf("required field include missing")
207210
}
208-
if all.Inputs == nil {
209-
return fmt.Errorf("required field inputs missing")
210-
}
211211
if all.Type == nil {
212212
return fmt.Errorf("required field type missing")
213213
}
214214
additionalProperties := make(map[string]interface{})
215215
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "type"})
216+
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "type"})
217217
} else {
218218
return err
219219
}
220220

221221
hasInvalidField := false
222+
o.Enabled = *all.Enabled
222223
o.Fields = *all.Fields
223224
o.Id = *all.Id
224225
o.Include = *all.Include
225-
o.Inputs = *all.Inputs
226226
if !all.Type.IsValid() {
227227
hasInvalidField = true
228228
} else {

api/datadogV2/model_observability_pipeline_config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
type ObservabilityPipelineConfig struct {
1515
// A list of destination components where processed logs are sent.
1616
Destinations []ObservabilityPipelineConfigDestinationItem `json:"destinations"`
17-
// A list of processors that transform or enrich log data.
18-
Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"`
17+
// A list of processor groups that transform or enrich log data.
18+
Processors []ObservabilityPipelineConfigProcessorGroup `json:"processors,omitempty"`
1919
// A list of configured data sources for the pipeline.
2020
Sources []ObservabilityPipelineConfigSourceItem `json:"sources"`
2121
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -66,17 +66,17 @@ func (o *ObservabilityPipelineConfig) SetDestinations(v []ObservabilityPipelineC
6666
}
6767

6868
// GetProcessors returns the Processors field value if set, zero value otherwise.
69-
func (o *ObservabilityPipelineConfig) GetProcessors() []ObservabilityPipelineConfigProcessorItem {
69+
func (o *ObservabilityPipelineConfig) GetProcessors() []ObservabilityPipelineConfigProcessorGroup {
7070
if o == nil || o.Processors == nil {
71-
var ret []ObservabilityPipelineConfigProcessorItem
71+
var ret []ObservabilityPipelineConfigProcessorGroup
7272
return ret
7373
}
7474
return o.Processors
7575
}
7676

7777
// GetProcessorsOk returns a tuple with the Processors field value if set, nil otherwise
7878
// and a boolean to check if the value has been set.
79-
func (o *ObservabilityPipelineConfig) GetProcessorsOk() (*[]ObservabilityPipelineConfigProcessorItem, bool) {
79+
func (o *ObservabilityPipelineConfig) GetProcessorsOk() (*[]ObservabilityPipelineConfigProcessorGroup, bool) {
8080
if o == nil || o.Processors == nil {
8181
return nil, false
8282
}
@@ -88,8 +88,8 @@ func (o *ObservabilityPipelineConfig) HasProcessors() bool {
8888
return o != nil && o.Processors != nil
8989
}
9090

91-
// SetProcessors gets a reference to the given []ObservabilityPipelineConfigProcessorItem and assigns it to the Processors field.
92-
func (o *ObservabilityPipelineConfig) SetProcessors(v []ObservabilityPipelineConfigProcessorItem) {
91+
// SetProcessors gets a reference to the given []ObservabilityPipelineConfigProcessorGroup and assigns it to the Processors field.
92+
func (o *ObservabilityPipelineConfig) SetProcessors(v []ObservabilityPipelineConfigProcessorGroup) {
9393
o.Processors = v
9494
}
9595

@@ -138,7 +138,7 @@ func (o ObservabilityPipelineConfig) MarshalJSON() ([]byte, error) {
138138
func (o *ObservabilityPipelineConfig) UnmarshalJSON(bytes []byte) (err error) {
139139
all := struct {
140140
Destinations *[]ObservabilityPipelineConfigDestinationItem `json:"destinations"`
141-
Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"`
141+
Processors []ObservabilityPipelineConfigProcessorGroup `json:"processors,omitempty"`
142142
Sources *[]ObservabilityPipelineConfigSourceItem `json:"sources"`
143143
}{}
144144
if err = datadog.Unmarshal(bytes, &all); err != nil {

0 commit comments

Comments
 (0)