Skip to content

Commit c166546

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Observability Pipelines - Updating descriptions and making the tags field optional not required (#3739)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3f80a51 commit c166546

6 files changed

Lines changed: 30 additions & 23 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44218,7 +44218,10 @@ components:
4421844218
action:
4421944219
$ref: "#/components/schemas/ObservabilityPipelineSensitiveDataScannerProcessorActionHashAction"
4422044220
options:
44221-
description: The `ObservabilityPipelineSensitiveDataScannerProcessorActionHash` `options`.
44221+
description: |-
44222+
Optional settings for the hash action. When omitted or empty, matched sensitive data is
44223+
replaced with a deterministic hashed value that preserves structure for analytics while
44224+
protecting the original content. Reserved for future hash configuration (for example, algorithm or salt).
4422244225
type: object
4422344226
required: [action]
4422444227
type: object
@@ -44249,7 +44252,7 @@ components:
4424944252
description: Controls how partial redaction is applied, including character count and direction.
4425044253
properties:
4425144254
characters:
44252-
description: The `ObservabilityPipelineSensitiveDataScannerProcessorActionPartialRedactOptions` `characters`.
44255+
description: Number of characters to leave visible from the start or end of the matched value; the rest are redacted.
4425344256
example: 4
4425444257
format: int64
4425544258
type: integer
@@ -44285,7 +44288,7 @@ components:
4428544288
description: Configuration for fully redacting sensitive data.
4428644289
properties:
4428744290
replace:
44288-
description: The `ObservabilityPipelineSensitiveDataScannerProcessorActionRedactOptions` `replace`.
44291+
description: The string used to replace matched sensitive data (for example, "***" or "[REDACTED]").
4428944292
example: "***"
4429044293
type: string
4429144294
required: [replace]
@@ -44395,7 +44398,6 @@ components:
4439544398
type: array
4439644399
required:
4439744400
- name
44398-
- tags
4439944401
- pattern
4440044402
- scope
4440144403
- on_match
@@ -44456,7 +44458,7 @@ components:
4445644458
description: Fields to which the scope rule applies.
4445744459
properties:
4445844460
fields:
44459-
description: The `ObservabilityPipelineSensitiveDataScannerProcessorScopeOptions` `fields`.
44461+
description: List of log attribute names (field paths) to which the scope applies. Only these fields are included in or excluded from pattern matching.
4446044462
example:
4446144463
- ""
4446244464
items:

api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor_action_hash.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import (
1414
type ObservabilityPipelineSensitiveDataScannerProcessorActionHash struct {
1515
// Action type that replaces the matched sensitive data with a hashed representation, preserving structure while securing content.
1616
Action ObservabilityPipelineSensitiveDataScannerProcessorActionHashAction `json:"action"`
17-
// The `ObservabilityPipelineSensitiveDataScannerProcessorActionHash` `options`.
17+
// Optional settings for the hash action. When omitted or empty, matched sensitive data is
18+
// replaced with a deterministic hashed value that preserves structure for analytics while
19+
// protecting the original content. Reserved for future hash configuration (for example, algorithm or salt).
1820
Options interface{} `json:"options,omitempty"`
1921
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2022
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor_action_partial_redact_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// ObservabilityPipelineSensitiveDataScannerProcessorActionPartialRedactOptions Controls how partial redaction is applied, including character count and direction.
1414
type ObservabilityPipelineSensitiveDataScannerProcessorActionPartialRedactOptions struct {
15-
// The `ObservabilityPipelineSensitiveDataScannerProcessorActionPartialRedactOptions` `characters`.
15+
// Number of characters to leave visible from the start or end of the matched value; the rest are redacted.
1616
Characters int64 `json:"characters"`
1717
// Indicates whether to redact characters from the first or last part of the matched value.
1818
Direction ObservabilityPipelineSensitiveDataScannerProcessorActionPartialRedactOptionsDirection `json:"direction"`

api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor_action_redact_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// ObservabilityPipelineSensitiveDataScannerProcessorActionRedactOptions Configuration for fully redacting sensitive data.
1414
type ObservabilityPipelineSensitiveDataScannerProcessorActionRedactOptions struct {
15-
// The `ObservabilityPipelineSensitiveDataScannerProcessorActionRedactOptions` `replace`.
15+
// The string used to replace matched sensitive data (for example, "***" or "[REDACTED]").
1616
Replace string `json:"replace"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor_rule.go

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type ObservabilityPipelineSensitiveDataScannerProcessorRule struct {
2323
// Determines which parts of the log the pattern-matching rule should be applied to.
2424
Scope ObservabilityPipelineSensitiveDataScannerProcessorScope `json:"scope"`
2525
// Tags assigned to this rule for filtering and classification.
26-
Tags []string `json:"tags"`
26+
Tags []string `json:"tags,omitempty"`
2727
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2828
UnparsedObject map[string]interface{} `json:"-"`
2929
AdditionalProperties map[string]interface{} `json:"-"`
@@ -33,13 +33,12 @@ type ObservabilityPipelineSensitiveDataScannerProcessorRule struct {
3333
// This constructor will assign default values to properties that have it defined,
3434
// and makes sure properties required by API are set, but the set of arguments
3535
// will change when the set of required properties is changed.
36-
func NewObservabilityPipelineSensitiveDataScannerProcessorRule(name string, onMatch ObservabilityPipelineSensitiveDataScannerProcessorAction, pattern ObservabilityPipelineSensitiveDataScannerProcessorPattern, scope ObservabilityPipelineSensitiveDataScannerProcessorScope, tags []string) *ObservabilityPipelineSensitiveDataScannerProcessorRule {
36+
func NewObservabilityPipelineSensitiveDataScannerProcessorRule(name string, onMatch ObservabilityPipelineSensitiveDataScannerProcessorAction, pattern ObservabilityPipelineSensitiveDataScannerProcessorPattern, scope ObservabilityPipelineSensitiveDataScannerProcessorScope) *ObservabilityPipelineSensitiveDataScannerProcessorRule {
3737
this := ObservabilityPipelineSensitiveDataScannerProcessorRule{}
3838
this.Name = name
3939
this.OnMatch = onMatch
4040
this.Pattern = pattern
4141
this.Scope = scope
42-
this.Tags = tags
4342
return &this
4443
}
4544

@@ -171,25 +170,30 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) SetScope(v Obse
171170
o.Scope = v
172171
}
173172

174-
// GetTags returns the Tags field value.
173+
// GetTags returns the Tags field value if set, zero value otherwise.
175174
func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) GetTags() []string {
176-
if o == nil {
175+
if o == nil || o.Tags == nil {
177176
var ret []string
178177
return ret
179178
}
180179
return o.Tags
181180
}
182181

183-
// GetTagsOk returns a tuple with the Tags field value
182+
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
184183
// and a boolean to check if the value has been set.
185184
func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) GetTagsOk() (*[]string, bool) {
186-
if o == nil {
185+
if o == nil || o.Tags == nil {
187186
return nil, false
188187
}
189188
return &o.Tags, true
190189
}
191190

192-
// SetTags sets field value.
191+
// HasTags returns a boolean if a field has been set.
192+
func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) HasTags() bool {
193+
return o != nil && o.Tags != nil
194+
}
195+
196+
// SetTags gets a reference to the given []string and assigns it to the Tags field.
193197
func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) SetTags(v []string) {
194198
o.Tags = v
195199
}
@@ -207,7 +211,9 @@ func (o ObservabilityPipelineSensitiveDataScannerProcessorRule) MarshalJSON() ([
207211
toSerialize["on_match"] = o.OnMatch
208212
toSerialize["pattern"] = o.Pattern
209213
toSerialize["scope"] = o.Scope
210-
toSerialize["tags"] = o.Tags
214+
if o.Tags != nil {
215+
toSerialize["tags"] = o.Tags
216+
}
211217

212218
for key, value := range o.AdditionalProperties {
213219
toSerialize[key] = value
@@ -223,7 +229,7 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) UnmarshalJSON(b
223229
OnMatch *ObservabilityPipelineSensitiveDataScannerProcessorAction `json:"on_match"`
224230
Pattern *ObservabilityPipelineSensitiveDataScannerProcessorPattern `json:"pattern"`
225231
Scope *ObservabilityPipelineSensitiveDataScannerProcessorScope `json:"scope"`
226-
Tags *[]string `json:"tags"`
232+
Tags []string `json:"tags,omitempty"`
227233
}{}
228234
if err = datadog.Unmarshal(bytes, &all); err != nil {
229235
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -240,9 +246,6 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) UnmarshalJSON(b
240246
if all.Scope == nil {
241247
return fmt.Errorf("required field scope missing")
242248
}
243-
if all.Tags == nil {
244-
return fmt.Errorf("required field tags missing")
245-
}
246249
additionalProperties := make(map[string]interface{})
247250
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
248251
datadog.DeleteKeys(additionalProperties, &[]string{"keyword_options", "name", "on_match", "pattern", "scope", "tags"})
@@ -259,7 +262,7 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessorRule) UnmarshalJSON(b
259262
o.OnMatch = *all.OnMatch
260263
o.Pattern = *all.Pattern
261264
o.Scope = *all.Scope
262-
o.Tags = *all.Tags
265+
o.Tags = all.Tags
263266

264267
if len(additionalProperties) > 0 {
265268
o.AdditionalProperties = additionalProperties

api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor_scope_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// ObservabilityPipelineSensitiveDataScannerProcessorScopeOptions Fields to which the scope rule applies.
1414
type ObservabilityPipelineSensitiveDataScannerProcessorScopeOptions struct {
15-
// The `ObservabilityPipelineSensitiveDataScannerProcessorScopeOptions` `fields`.
15+
// List of log attribute names (field paths) to which the scope applies. Only these fields are included in or excluded from pattern matching.
1616
Fields []string `json:"fields"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`

0 commit comments

Comments
 (0)