Skip to content

Commit 1a578a0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b1a1c000 of spec repo (#3129)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 6fe6221 commit 1a578a0

26 files changed

Lines changed: 1182 additions & 108 deletions

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-17 14:55:57.538830",
8-
"spec_repo_commit": "b359fdcc"
7+
"regenerated": "2025-06-17 18:22:00.647030",
8+
"spec_repo_commit": "b1a1c000"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-17 14:55:57.554821",
13-
"spec_repo_commit": "b359fdcc"
12+
"regenerated": "2025-06-17 18:22:00.662709",
13+
"spec_repo_commit": "b1a1c000"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35002,6 +35002,11 @@ components:
3500235002
items:
3500335003
$ref: '#/components/schemas/SensitiveDataScannerProduct'
3500435004
type: array
35005+
samplings:
35006+
description: List of sampling rates per product type.
35007+
items:
35008+
$ref: '#/components/schemas/SensitiveDataScannerSamplings'
35009+
type: array
3500535010
type: object
3500635011
SensitiveDataScannerGroupCreate:
3500735012
description: Data related to the creation of a group.
@@ -35433,6 +35438,19 @@ components:
3543335438
meta:
3543435439
$ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly'
3543535440
type: object
35441+
SensitiveDataScannerSamplings:
35442+
description: Sampling configurations for the Scanning Group.
35443+
properties:
35444+
product:
35445+
$ref: '#/components/schemas/SensitiveDataScannerProduct'
35446+
rate:
35447+
description: Rate at which data in product type will be scanned, as a percentage.
35448+
example: 100.0
35449+
format: double
35450+
maximum: 100.0
35451+
minimum: 0.0
35452+
type: number
35453+
type: object
3543635454
SensitiveDataScannerStandardPattern:
3543735455
description: Data containing the standard pattern id.
3543835456
properties:

api/datadogV2/model_sensitive_data_scanner_group_attributes.go

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type SensitiveDataScannerGroupAttributes struct {
2020
Name *string `json:"name,omitempty"`
2121
// List of products the scanning group applies.
2222
ProductList []SensitiveDataScannerProduct `json:"product_list,omitempty"`
23+
// List of sampling rates per product type.
24+
Samplings []SensitiveDataScannerSamplings `json:"samplings,omitempty"`
2325
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2426
UnparsedObject map[string]interface{} `json:"-"`
2527
AdditionalProperties map[string]interface{} `json:"-"`
@@ -182,6 +184,34 @@ func (o *SensitiveDataScannerGroupAttributes) SetProductList(v []SensitiveDataSc
182184
o.ProductList = v
183185
}
184186

187+
// GetSamplings returns the Samplings field value if set, zero value otherwise.
188+
func (o *SensitiveDataScannerGroupAttributes) GetSamplings() []SensitiveDataScannerSamplings {
189+
if o == nil || o.Samplings == nil {
190+
var ret []SensitiveDataScannerSamplings
191+
return ret
192+
}
193+
return o.Samplings
194+
}
195+
196+
// GetSamplingsOk returns a tuple with the Samplings field value if set, nil otherwise
197+
// and a boolean to check if the value has been set.
198+
func (o *SensitiveDataScannerGroupAttributes) GetSamplingsOk() (*[]SensitiveDataScannerSamplings, bool) {
199+
if o == nil || o.Samplings == nil {
200+
return nil, false
201+
}
202+
return &o.Samplings, true
203+
}
204+
205+
// HasSamplings returns a boolean if a field has been set.
206+
func (o *SensitiveDataScannerGroupAttributes) HasSamplings() bool {
207+
return o != nil && o.Samplings != nil
208+
}
209+
210+
// SetSamplings gets a reference to the given []SensitiveDataScannerSamplings and assigns it to the Samplings field.
211+
func (o *SensitiveDataScannerGroupAttributes) SetSamplings(v []SensitiveDataScannerSamplings) {
212+
o.Samplings = v
213+
}
214+
185215
// MarshalJSON serializes the struct using spec logic.
186216
func (o SensitiveDataScannerGroupAttributes) MarshalJSON() ([]byte, error) {
187217
toSerialize := map[string]interface{}{}
@@ -203,6 +233,9 @@ func (o SensitiveDataScannerGroupAttributes) MarshalJSON() ([]byte, error) {
203233
if o.ProductList != nil {
204234
toSerialize["product_list"] = o.ProductList
205235
}
236+
if o.Samplings != nil {
237+
toSerialize["samplings"] = o.Samplings
238+
}
206239

207240
for key, value := range o.AdditionalProperties {
208241
toSerialize[key] = value
@@ -213,18 +246,19 @@ func (o SensitiveDataScannerGroupAttributes) MarshalJSON() ([]byte, error) {
213246
// UnmarshalJSON deserializes the given payload.
214247
func (o *SensitiveDataScannerGroupAttributes) UnmarshalJSON(bytes []byte) (err error) {
215248
all := struct {
216-
Description *string `json:"description,omitempty"`
217-
Filter *SensitiveDataScannerFilter `json:"filter,omitempty"`
218-
IsEnabled *bool `json:"is_enabled,omitempty"`
219-
Name *string `json:"name,omitempty"`
220-
ProductList []SensitiveDataScannerProduct `json:"product_list,omitempty"`
249+
Description *string `json:"description,omitempty"`
250+
Filter *SensitiveDataScannerFilter `json:"filter,omitempty"`
251+
IsEnabled *bool `json:"is_enabled,omitempty"`
252+
Name *string `json:"name,omitempty"`
253+
ProductList []SensitiveDataScannerProduct `json:"product_list,omitempty"`
254+
Samplings []SensitiveDataScannerSamplings `json:"samplings,omitempty"`
221255
}{}
222256
if err = datadog.Unmarshal(bytes, &all); err != nil {
223257
return datadog.Unmarshal(bytes, &o.UnparsedObject)
224258
}
225259
additionalProperties := make(map[string]interface{})
226260
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
227-
datadog.DeleteKeys(additionalProperties, &[]string{"description", "filter", "is_enabled", "name", "product_list"})
261+
datadog.DeleteKeys(additionalProperties, &[]string{"description", "filter", "is_enabled", "name", "product_list", "samplings"})
228262
} else {
229263
return err
230264
}
@@ -238,6 +272,7 @@ func (o *SensitiveDataScannerGroupAttributes) UnmarshalJSON(bytes []byte) (err e
238272
o.IsEnabled = all.IsEnabled
239273
o.Name = all.Name
240274
o.ProductList = all.ProductList
275+
o.Samplings = all.Samplings
241276

242277
if len(additionalProperties) > 0 {
243278
o.AdditionalProperties = additionalProperties
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// SensitiveDataScannerSamplings Sampling configurations for the Scanning Group.
12+
type SensitiveDataScannerSamplings struct {
13+
// Datadog product onto which Sensitive Data Scanner can be activated.
14+
Product *SensitiveDataScannerProduct `json:"product,omitempty"`
15+
// Rate at which data in product type will be scanned, as a percentage.
16+
Rate *float64 `json:"rate,omitempty"`
17+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
18+
UnparsedObject map[string]interface{} `json:"-"`
19+
AdditionalProperties map[string]interface{} `json:"-"`
20+
}
21+
22+
// NewSensitiveDataScannerSamplings instantiates a new SensitiveDataScannerSamplings object.
23+
// This constructor will assign default values to properties that have it defined,
24+
// and makes sure properties required by API are set, but the set of arguments
25+
// will change when the set of required properties is changed.
26+
func NewSensitiveDataScannerSamplings() *SensitiveDataScannerSamplings {
27+
this := SensitiveDataScannerSamplings{}
28+
var product SensitiveDataScannerProduct = SENSITIVEDATASCANNERPRODUCT_LOGS
29+
this.Product = &product
30+
return &this
31+
}
32+
33+
// NewSensitiveDataScannerSamplingsWithDefaults instantiates a new SensitiveDataScannerSamplings object.
34+
// This constructor will only assign default values to properties that have it defined,
35+
// but it doesn't guarantee that properties required by API are set.
36+
func NewSensitiveDataScannerSamplingsWithDefaults() *SensitiveDataScannerSamplings {
37+
this := SensitiveDataScannerSamplings{}
38+
var product SensitiveDataScannerProduct = SENSITIVEDATASCANNERPRODUCT_LOGS
39+
this.Product = &product
40+
return &this
41+
}
42+
43+
// GetProduct returns the Product field value if set, zero value otherwise.
44+
func (o *SensitiveDataScannerSamplings) GetProduct() SensitiveDataScannerProduct {
45+
if o == nil || o.Product == nil {
46+
var ret SensitiveDataScannerProduct
47+
return ret
48+
}
49+
return *o.Product
50+
}
51+
52+
// GetProductOk returns a tuple with the Product field value if set, nil otherwise
53+
// and a boolean to check if the value has been set.
54+
func (o *SensitiveDataScannerSamplings) GetProductOk() (*SensitiveDataScannerProduct, bool) {
55+
if o == nil || o.Product == nil {
56+
return nil, false
57+
}
58+
return o.Product, true
59+
}
60+
61+
// HasProduct returns a boolean if a field has been set.
62+
func (o *SensitiveDataScannerSamplings) HasProduct() bool {
63+
return o != nil && o.Product != nil
64+
}
65+
66+
// SetProduct gets a reference to the given SensitiveDataScannerProduct and assigns it to the Product field.
67+
func (o *SensitiveDataScannerSamplings) SetProduct(v SensitiveDataScannerProduct) {
68+
o.Product = &v
69+
}
70+
71+
// GetRate returns the Rate field value if set, zero value otherwise.
72+
func (o *SensitiveDataScannerSamplings) GetRate() float64 {
73+
if o == nil || o.Rate == nil {
74+
var ret float64
75+
return ret
76+
}
77+
return *o.Rate
78+
}
79+
80+
// GetRateOk returns a tuple with the Rate field value if set, nil otherwise
81+
// and a boolean to check if the value has been set.
82+
func (o *SensitiveDataScannerSamplings) GetRateOk() (*float64, bool) {
83+
if o == nil || o.Rate == nil {
84+
return nil, false
85+
}
86+
return o.Rate, true
87+
}
88+
89+
// HasRate returns a boolean if a field has been set.
90+
func (o *SensitiveDataScannerSamplings) HasRate() bool {
91+
return o != nil && o.Rate != nil
92+
}
93+
94+
// SetRate gets a reference to the given float64 and assigns it to the Rate field.
95+
func (o *SensitiveDataScannerSamplings) SetRate(v float64) {
96+
o.Rate = &v
97+
}
98+
99+
// MarshalJSON serializes the struct using spec logic.
100+
func (o SensitiveDataScannerSamplings) MarshalJSON() ([]byte, error) {
101+
toSerialize := map[string]interface{}{}
102+
if o.UnparsedObject != nil {
103+
return datadog.Marshal(o.UnparsedObject)
104+
}
105+
if o.Product != nil {
106+
toSerialize["product"] = o.Product
107+
}
108+
if o.Rate != nil {
109+
toSerialize["rate"] = o.Rate
110+
}
111+
112+
for key, value := range o.AdditionalProperties {
113+
toSerialize[key] = value
114+
}
115+
return datadog.Marshal(toSerialize)
116+
}
117+
118+
// UnmarshalJSON deserializes the given payload.
119+
func (o *SensitiveDataScannerSamplings) UnmarshalJSON(bytes []byte) (err error) {
120+
all := struct {
121+
Product *SensitiveDataScannerProduct `json:"product,omitempty"`
122+
Rate *float64 `json:"rate,omitempty"`
123+
}{}
124+
if err = datadog.Unmarshal(bytes, &all); err != nil {
125+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
126+
}
127+
additionalProperties := make(map[string]interface{})
128+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
129+
datadog.DeleteKeys(additionalProperties, &[]string{"product", "rate"})
130+
} else {
131+
return err
132+
}
133+
134+
hasInvalidField := false
135+
if all.Product != nil && !all.Product.IsValid() {
136+
hasInvalidField = true
137+
} else {
138+
o.Product = all.Product
139+
}
140+
o.Rate = all.Rate
141+
142+
if len(additionalProperties) > 0 {
143+
o.AdditionalProperties = additionalProperties
144+
}
145+
146+
if hasInvalidField {
147+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
148+
}
149+
150+
return nil
151+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-12-15T14:50:52.745Z
1+
2025-05-30T17:17:05.785Z

0 commit comments

Comments
 (0)