Skip to content

Commit 89c6c91

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f47923e of spec repo
1 parent 9b3f2ec commit 89c6c91

25 files changed

+1601
-426
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 210 additions & 65 deletions
Large diffs are not rendered by default.

api/datadogV2/model_observability_pipeline_add_env_vars_processor.go

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ 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,omitempty"`
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"`
21+
// A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group.
22+
Inputs []string `json:"inputs,omitempty"`
2123
// The processor type. The value should always be `add_env_vars`.
2224
Type ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
2325
// A list of environment variable mappings to apply to log fields.
@@ -31,11 +33,10 @@ type ObservabilityPipelineAddEnvVarsProcessor struct {
3133
// This constructor will assign default values to properties that have it defined,
3234
// and makes sure properties required by API are set, but the set of arguments
3335
// will change when the set of required properties is changed.
34-
func NewObservabilityPipelineAddEnvVarsProcessor(id string, include string, inputs []string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor {
36+
func NewObservabilityPipelineAddEnvVarsProcessor(id string, include string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor {
3537
this := ObservabilityPipelineAddEnvVarsProcessor{}
3638
this.Id = id
3739
this.Include = include
38-
this.Inputs = inputs
3940
this.Type = typeVar
4041
this.Variables = variables
4142
return &this
@@ -51,6 +52,34 @@ func NewObservabilityPipelineAddEnvVarsProcessorWithDefaults() *ObservabilityPip
5152
return &this
5253
}
5354

55+
// GetEnabled returns the Enabled field value if set, zero value otherwise.
56+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabled() bool {
57+
if o == nil || o.Enabled == nil {
58+
var ret bool
59+
return ret
60+
}
61+
return *o.Enabled
62+
}
63+
64+
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
65+
// and a boolean to check if the value has been set.
66+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabledOk() (*bool, bool) {
67+
if o == nil || o.Enabled == nil {
68+
return nil, false
69+
}
70+
return o.Enabled, true
71+
}
72+
73+
// HasEnabled returns a boolean if a field has been set.
74+
func (o *ObservabilityPipelineAddEnvVarsProcessor) HasEnabled() bool {
75+
return o != nil && o.Enabled != nil
76+
}
77+
78+
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
79+
func (o *ObservabilityPipelineAddEnvVarsProcessor) SetEnabled(v bool) {
80+
o.Enabled = &v
81+
}
82+
5483
// GetId returns the Id field value.
5584
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetId() string {
5685
if o == nil {
@@ -97,25 +126,30 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInclude(v string) {
97126
o.Include = v
98127
}
99128

100-
// GetInputs returns the Inputs field value.
129+
// GetInputs returns the Inputs field value if set, zero value otherwise.
101130
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputs() []string {
102-
if o == nil {
131+
if o == nil || o.Inputs == nil {
103132
var ret []string
104133
return ret
105134
}
106135
return o.Inputs
107136
}
108137

109-
// GetInputsOk returns a tuple with the Inputs field value
138+
// GetInputsOk returns a tuple with the Inputs field value if set, nil otherwise
110139
// and a boolean to check if the value has been set.
111140
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputsOk() (*[]string, bool) {
112-
if o == nil {
141+
if o == nil || o.Inputs == nil {
113142
return nil, false
114143
}
115144
return &o.Inputs, true
116145
}
117146

118-
// SetInputs sets field value.
147+
// HasInputs returns a boolean if a field has been set.
148+
func (o *ObservabilityPipelineAddEnvVarsProcessor) HasInputs() bool {
149+
return o != nil && o.Inputs != nil
150+
}
151+
152+
// SetInputs gets a reference to the given []string and assigns it to the Inputs field.
119153
func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInputs(v []string) {
120154
o.Inputs = v
121155
}
@@ -172,9 +206,14 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
172206
if o.UnparsedObject != nil {
173207
return datadog.Marshal(o.UnparsedObject)
174208
}
209+
if o.Enabled != nil {
210+
toSerialize["enabled"] = o.Enabled
211+
}
175212
toSerialize["id"] = o.Id
176213
toSerialize["include"] = o.Include
177-
toSerialize["inputs"] = o.Inputs
214+
if o.Inputs != nil {
215+
toSerialize["inputs"] = o.Inputs
216+
}
178217
toSerialize["type"] = o.Type
179218
toSerialize["variables"] = o.Variables
180219

@@ -187,9 +226,10 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
187226
// UnmarshalJSON deserializes the given payload.
188227
func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189228
all := struct {
229+
Enabled *bool `json:"enabled,omitempty"`
190230
Id *string `json:"id"`
191231
Include *string `json:"include"`
192-
Inputs *[]string `json:"inputs"`
232+
Inputs []string `json:"inputs,omitempty"`
193233
Type *ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
194234
Variables *[]ObservabilityPipelineAddEnvVarsProcessorVariable `json:"variables"`
195235
}{}
@@ -202,9 +242,6 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (
202242
if all.Include == nil {
203243
return fmt.Errorf("required field include missing")
204244
}
205-
if all.Inputs == nil {
206-
return fmt.Errorf("required field inputs missing")
207-
}
208245
if all.Type == nil {
209246
return fmt.Errorf("required field type missing")
210247
}
@@ -213,15 +250,16 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (
213250
}
214251
additionalProperties := make(map[string]interface{})
215252
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "type", "variables"})
253+
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "inputs", "type", "variables"})
217254
} else {
218255
return err
219256
}
220257

221258
hasInvalidField := false
259+
o.Enabled = all.Enabled
222260
o.Id = *all.Id
223261
o.Include = *all.Include
224-
o.Inputs = *all.Inputs
262+
o.Inputs = all.Inputs
225263
if !all.Type.IsValid() {
226264
hasInvalidField = true
227265
} else {

api/datadogV2/model_observability_pipeline_add_fields_processor.go

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ 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,omitempty"`
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"`
23+
// A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group.
24+
Inputs []string `json:"inputs,omitempty"`
2325
// The processor type. The value should always be `add_fields`.
2426
Type ObservabilityPipelineAddFieldsProcessorType `json:"type"`
2527
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -31,12 +33,11 @@ type ObservabilityPipelineAddFieldsProcessor struct {
3133
// This constructor will assign default values to properties that have it defined,
3234
// and makes sure properties required by API are set, but the set of arguments
3335
// will change when the set of required properties is changed.
34-
func NewObservabilityPipelineAddFieldsProcessor(fields []ObservabilityPipelineFieldValue, id string, include string, inputs []string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor {
36+
func NewObservabilityPipelineAddFieldsProcessor(fields []ObservabilityPipelineFieldValue, id string, include string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor {
3537
this := ObservabilityPipelineAddFieldsProcessor{}
3638
this.Fields = fields
3739
this.Id = id
3840
this.Include = include
39-
this.Inputs = inputs
4041
this.Type = typeVar
4142
return &this
4243
}
@@ -51,6 +52,34 @@ func NewObservabilityPipelineAddFieldsProcessorWithDefaults() *ObservabilityPipe
5152
return &this
5253
}
5354

55+
// GetEnabled returns the Enabled field value if set, zero value otherwise.
56+
func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabled() bool {
57+
if o == nil || o.Enabled == nil {
58+
var ret bool
59+
return ret
60+
}
61+
return *o.Enabled
62+
}
63+
64+
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
65+
// and a boolean to check if the value has been set.
66+
func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabledOk() (*bool, bool) {
67+
if o == nil || o.Enabled == nil {
68+
return nil, false
69+
}
70+
return o.Enabled, true
71+
}
72+
73+
// HasEnabled returns a boolean if a field has been set.
74+
func (o *ObservabilityPipelineAddFieldsProcessor) HasEnabled() bool {
75+
return o != nil && o.Enabled != nil
76+
}
77+
78+
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
79+
func (o *ObservabilityPipelineAddFieldsProcessor) SetEnabled(v bool) {
80+
o.Enabled = &v
81+
}
82+
5483
// GetFields returns the Fields field value.
5584
func (o *ObservabilityPipelineAddFieldsProcessor) GetFields() []ObservabilityPipelineFieldValue {
5685
if o == nil {
@@ -120,25 +149,30 @@ func (o *ObservabilityPipelineAddFieldsProcessor) SetInclude(v string) {
120149
o.Include = v
121150
}
122151

123-
// GetInputs returns the Inputs field value.
152+
// GetInputs returns the Inputs field value if set, zero value otherwise.
124153
func (o *ObservabilityPipelineAddFieldsProcessor) GetInputs() []string {
125-
if o == nil {
154+
if o == nil || o.Inputs == nil {
126155
var ret []string
127156
return ret
128157
}
129158
return o.Inputs
130159
}
131160

132-
// GetInputsOk returns a tuple with the Inputs field value
161+
// GetInputsOk returns a tuple with the Inputs field value if set, nil otherwise
133162
// and a boolean to check if the value has been set.
134163
func (o *ObservabilityPipelineAddFieldsProcessor) GetInputsOk() (*[]string, bool) {
135-
if o == nil {
164+
if o == nil || o.Inputs == nil {
136165
return nil, false
137166
}
138167
return &o.Inputs, true
139168
}
140169

141-
// SetInputs sets field value.
170+
// HasInputs returns a boolean if a field has been set.
171+
func (o *ObservabilityPipelineAddFieldsProcessor) HasInputs() bool {
172+
return o != nil && o.Inputs != nil
173+
}
174+
175+
// SetInputs gets a reference to the given []string and assigns it to the Inputs field.
142176
func (o *ObservabilityPipelineAddFieldsProcessor) SetInputs(v []string) {
143177
o.Inputs = v
144178
}
@@ -172,10 +206,15 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
172206
if o.UnparsedObject != nil {
173207
return datadog.Marshal(o.UnparsedObject)
174208
}
209+
if o.Enabled != nil {
210+
toSerialize["enabled"] = o.Enabled
211+
}
175212
toSerialize["fields"] = o.Fields
176213
toSerialize["id"] = o.Id
177214
toSerialize["include"] = o.Include
178-
toSerialize["inputs"] = o.Inputs
215+
if o.Inputs != nil {
216+
toSerialize["inputs"] = o.Inputs
217+
}
179218
toSerialize["type"] = o.Type
180219

181220
for key, value := range o.AdditionalProperties {
@@ -187,10 +226,11 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
187226
// UnmarshalJSON deserializes the given payload.
188227
func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189228
all := struct {
229+
Enabled *bool `json:"enabled,omitempty"`
190230
Fields *[]ObservabilityPipelineFieldValue `json:"fields"`
191231
Id *string `json:"id"`
192232
Include *string `json:"include"`
193-
Inputs *[]string `json:"inputs"`
233+
Inputs []string `json:"inputs,omitempty"`
194234
Type *ObservabilityPipelineAddFieldsProcessorType `json:"type"`
195235
}{}
196236
if err = datadog.Unmarshal(bytes, &all); err != nil {
@@ -205,24 +245,22 @@ func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (e
205245
if all.Include == nil {
206246
return fmt.Errorf("required field include missing")
207247
}
208-
if all.Inputs == nil {
209-
return fmt.Errorf("required field inputs missing")
210-
}
211248
if all.Type == nil {
212249
return fmt.Errorf("required field type missing")
213250
}
214251
additionalProperties := make(map[string]interface{})
215252
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "type"})
253+
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "inputs", "type"})
217254
} else {
218255
return err
219256
}
220257

221258
hasInvalidField := false
259+
o.Enabled = all.Enabled
222260
o.Fields = *all.Fields
223261
o.Id = *all.Id
224262
o.Include = *all.Include
225-
o.Inputs = *all.Inputs
263+
o.Inputs = all.Inputs
226264
if !all.Type.IsValid() {
227265
hasInvalidField = true
228266
} else {

api/datadogV2/model_observability_pipeline_config.go

Lines changed: 11 additions & 11 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 processors that transform or enrich log data, or a list of grouped processor configurations.
18+
Processors *ObservabilityPipelineConfigProcessors `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,31 +66,31 @@ 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() ObservabilityPipelineConfigProcessors {
7070
if o == nil || o.Processors == nil {
71-
var ret []ObservabilityPipelineConfigProcessorItem
71+
var ret ObservabilityPipelineConfigProcessors
7272
return ret
7373
}
74-
return o.Processors
74+
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() (*ObservabilityPipelineConfigProcessors, bool) {
8080
if o == nil || o.Processors == nil {
8181
return nil, false
8282
}
83-
return &o.Processors, true
83+
return o.Processors, true
8484
}
8585

8686
// HasProcessors returns a boolean if a field has been set.
8787
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) {
93-
o.Processors = v
91+
// SetProcessors gets a reference to the given ObservabilityPipelineConfigProcessors and assigns it to the Processors field.
92+
func (o *ObservabilityPipelineConfig) SetProcessors(v ObservabilityPipelineConfigProcessors) {
93+
o.Processors = &v
9494
}
9595

9696
// GetSources returns the Sources field value.
@@ -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 *ObservabilityPipelineConfigProcessors `json:"processors,omitempty"`
142142
Sources *[]ObservabilityPipelineConfigSourceItem `json:"sources"`
143143
}{}
144144
if err = datadog.Unmarshal(bytes, &all); err != nil {

0 commit comments

Comments
 (0)