Skip to content

Commit 857ff8a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add new SDS fields to usage API (#1726)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent d42154d commit 857ff8a

File tree

6 files changed

+492
-9
lines changed

6 files changed

+492
-9
lines changed

.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.4",
7-
"regenerated": "2022-10-25 14:15:19.092009",
8-
"spec_repo_commit": "ecf2f022"
7+
"regenerated": "2022-10-25 16:38:18.985317",
8+
"spec_repo_commit": "afdd6b70"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-10-25 14:15:19.105318",
13-
"spec_repo_commit": "ecf2f022"
12+
"regenerated": "2022-10-25 16:38:18.997896",
13+
"spec_repo_commit": "afdd6b70"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15677,6 +15677,18 @@ components:
1567715677
description: Sensitive Data Scanner usage for a given organization for a given
1567815678
hour.
1567915679
properties:
15680+
apm_scanned_bytes:
15681+
description: "The total number of bytes scanned of APM usage across all
15682+
usage types by the Sensitive Data Scanner from the start of the given
15683+
hour\u2019s month until the given hour."
15684+
format: int64
15685+
type: integer
15686+
events_scanned_bytes:
15687+
description: "The total number of bytes scanned of Events usage across all
15688+
usage types by the Sensitive Data Scanner from the start of the given
15689+
hour\u2019s month until the given hour."
15690+
format: int64
15691+
type: integer
1568015692
hour:
1568115693
description: The hour for the usage.
1568215694
format: date-time
@@ -15693,6 +15705,12 @@ components:
1569315705
public_id:
1569415706
description: The organization public ID.
1569515707
type: string
15708+
rum_scanned_bytes:
15709+
description: "The total number of bytes scanned of RUM usage across all
15710+
usage types by the Sensitive Data Scanner from the start of the given
15711+
hour\u2019s month until the given hour."
15712+
format: int64
15713+
type: integer
1569615714
total_scanned_bytes:
1569715715
description: "The total number of bytes scanned across all usage types by
1569815716
the Sensitive Data Scanner from the start of the given hour\u2019s month
@@ -16120,11 +16138,26 @@ components:
1612016138
hours in the current date for all organizations.
1612116139
format: int64
1612216140
type: integer
16141+
sds_apm_scanned_bytes_sum:
16142+
description: Sum of all APM bytes scanned with sensitive data scanner over
16143+
all hours in the current date for all organizations.
16144+
format: int64
16145+
type: integer
16146+
sds_events_scanned_bytes_sum:
16147+
description: Sum of all event stream events bytes scanned with sensitive
16148+
data scanner over all hours in the current date for all organizations.
16149+
format: int64
16150+
type: integer
1612316151
sds_logs_scanned_bytes_sum:
1612416152
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
1612516153
Data Scanner over all hours in the current month for all organizations.
1612616154
format: int64
1612716155
type: integer
16156+
sds_rum_scanned_bytes_sum:
16157+
description: Sum of all RUM bytes scanned with sensitive data scanner over
16158+
all hours in the current date for all organizations.
16159+
format: int64
16160+
type: integer
1612816161
sds_total_scanned_bytes_sum:
1612916162
description: Shows the sum of all bytes scanned across all usage types by
1613016163
the Sensitive Data Scanner over all hours in the current month for all
@@ -16458,11 +16491,26 @@ components:
1645816491
hours in the current date for the given org.
1645916492
format: int64
1646016493
type: integer
16494+
sds_apm_scanned_bytes_sum:
16495+
description: Sum of all APM bytes scanned with sensitive data scanner over
16496+
all hours in the current date for the given org.
16497+
format: int64
16498+
type: integer
16499+
sds_events_scanned_bytes_sum:
16500+
description: Sum of all event stream events bytes scanned with sensitive
16501+
data scanner over all hours in the current date for the given org.
16502+
format: int64
16503+
type: integer
1646116504
sds_logs_scanned_bytes_sum:
1646216505
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
1646316506
Data Scanner over all hours in the current month for the given org.
1646416507
format: int64
1646516508
type: integer
16509+
sds_rum_scanned_bytes_sum:
16510+
description: Sum of all RUM bytes scanned with sensitive data scanner over
16511+
all hours in the current date for the given org.
16512+
format: int64
16513+
type: integer
1646616514
sds_total_scanned_bytes_sum:
1646716515
description: Shows the sum of all bytes scanned across all usage types by
1646816516
the Sensitive Data Scanner over all hours in the current month for the
@@ -16833,11 +16881,26 @@ components:
1683316881
hours in the current months for all organizations.
1683416882
format: int64
1683516883
type: integer
16884+
sds_apm_scanned_bytes_sum:
16885+
description: Sum of all APM bytes scanned with sensitive data scanner in
16886+
the current months for all organizations.
16887+
format: int64
16888+
type: integer
16889+
sds_events_scanned_bytes_sum:
16890+
description: Sum of all event stream events bytes scanned with sensitive
16891+
data scanner in the current months for all organizations.
16892+
format: int64
16893+
type: integer
1683616894
sds_logs_scanned_bytes_sum:
1683716895
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
1683816896
Data Scanner over all hours in the current month for all organizations.
1683916897
format: int64
1684016898
type: integer
16899+
sds_rum_scanned_bytes_sum:
16900+
description: Sum of all RUM bytes scanned with sensitive data scanner in
16901+
the current months for all organizations.
16902+
format: int64
16903+
type: integer
1684116904
sds_total_scanned_bytes_sum:
1684216905
description: Shows the sum of all bytes scanned across all usage types by
1684316906
the Sensitive Data Scanner over all hours in the current month for all

api/datadogV1/model_usage_sds_hour.go

Lines changed: 110 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import (
1111

1212
// UsageSDSHour Sensitive Data Scanner usage for a given organization for a given hour.
1313
type UsageSDSHour struct {
14+
// The total number of bytes scanned of APM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
15+
ApmScannedBytes *int64 `json:"apm_scanned_bytes,omitempty"`
16+
// The total number of bytes scanned of Events usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
17+
EventsScannedBytes *int64 `json:"events_scanned_bytes,omitempty"`
1418
// The hour for the usage.
1519
Hour *time.Time `json:"hour,omitempty"`
1620
// The total number of bytes scanned of logs usage by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
@@ -19,6 +23,8 @@ type UsageSDSHour struct {
1923
OrgName *string `json:"org_name,omitempty"`
2024
// The organization public ID.
2125
PublicId *string `json:"public_id,omitempty"`
26+
// The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
27+
RumScannedBytes *int64 `json:"rum_scanned_bytes,omitempty"`
2228
// The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
2329
TotalScannedBytes *int64 `json:"total_scanned_bytes,omitempty"`
2430
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -43,6 +49,62 @@ func NewUsageSDSHourWithDefaults() *UsageSDSHour {
4349
return &this
4450
}
4551

52+
// GetApmScannedBytes returns the ApmScannedBytes field value if set, zero value otherwise.
53+
func (o *UsageSDSHour) GetApmScannedBytes() int64 {
54+
if o == nil || o.ApmScannedBytes == nil {
55+
var ret int64
56+
return ret
57+
}
58+
return *o.ApmScannedBytes
59+
}
60+
61+
// GetApmScannedBytesOk returns a tuple with the ApmScannedBytes field value if set, nil otherwise
62+
// and a boolean to check if the value has been set.
63+
func (o *UsageSDSHour) GetApmScannedBytesOk() (*int64, bool) {
64+
if o == nil || o.ApmScannedBytes == nil {
65+
return nil, false
66+
}
67+
return o.ApmScannedBytes, true
68+
}
69+
70+
// HasApmScannedBytes returns a boolean if a field has been set.
71+
func (o *UsageSDSHour) HasApmScannedBytes() bool {
72+
return o != nil && o.ApmScannedBytes != nil
73+
}
74+
75+
// SetApmScannedBytes gets a reference to the given int64 and assigns it to the ApmScannedBytes field.
76+
func (o *UsageSDSHour) SetApmScannedBytes(v int64) {
77+
o.ApmScannedBytes = &v
78+
}
79+
80+
// GetEventsScannedBytes returns the EventsScannedBytes field value if set, zero value otherwise.
81+
func (o *UsageSDSHour) GetEventsScannedBytes() int64 {
82+
if o == nil || o.EventsScannedBytes == nil {
83+
var ret int64
84+
return ret
85+
}
86+
return *o.EventsScannedBytes
87+
}
88+
89+
// GetEventsScannedBytesOk returns a tuple with the EventsScannedBytes field value if set, nil otherwise
90+
// and a boolean to check if the value has been set.
91+
func (o *UsageSDSHour) GetEventsScannedBytesOk() (*int64, bool) {
92+
if o == nil || o.EventsScannedBytes == nil {
93+
return nil, false
94+
}
95+
return o.EventsScannedBytes, true
96+
}
97+
98+
// HasEventsScannedBytes returns a boolean if a field has been set.
99+
func (o *UsageSDSHour) HasEventsScannedBytes() bool {
100+
return o != nil && o.EventsScannedBytes != nil
101+
}
102+
103+
// SetEventsScannedBytes gets a reference to the given int64 and assigns it to the EventsScannedBytes field.
104+
func (o *UsageSDSHour) SetEventsScannedBytes(v int64) {
105+
o.EventsScannedBytes = &v
106+
}
107+
46108
// GetHour returns the Hour field value if set, zero value otherwise.
47109
func (o *UsageSDSHour) GetHour() time.Time {
48110
if o == nil || o.Hour == nil {
@@ -155,6 +217,34 @@ func (o *UsageSDSHour) SetPublicId(v string) {
155217
o.PublicId = &v
156218
}
157219

220+
// GetRumScannedBytes returns the RumScannedBytes field value if set, zero value otherwise.
221+
func (o *UsageSDSHour) GetRumScannedBytes() int64 {
222+
if o == nil || o.RumScannedBytes == nil {
223+
var ret int64
224+
return ret
225+
}
226+
return *o.RumScannedBytes
227+
}
228+
229+
// GetRumScannedBytesOk returns a tuple with the RumScannedBytes field value if set, nil otherwise
230+
// and a boolean to check if the value has been set.
231+
func (o *UsageSDSHour) GetRumScannedBytesOk() (*int64, bool) {
232+
if o == nil || o.RumScannedBytes == nil {
233+
return nil, false
234+
}
235+
return o.RumScannedBytes, true
236+
}
237+
238+
// HasRumScannedBytes returns a boolean if a field has been set.
239+
func (o *UsageSDSHour) HasRumScannedBytes() bool {
240+
return o != nil && o.RumScannedBytes != nil
241+
}
242+
243+
// SetRumScannedBytes gets a reference to the given int64 and assigns it to the RumScannedBytes field.
244+
func (o *UsageSDSHour) SetRumScannedBytes(v int64) {
245+
o.RumScannedBytes = &v
246+
}
247+
158248
// GetTotalScannedBytes returns the TotalScannedBytes field value if set, zero value otherwise.
159249
func (o *UsageSDSHour) GetTotalScannedBytes() int64 {
160250
if o == nil || o.TotalScannedBytes == nil {
@@ -189,6 +279,12 @@ func (o UsageSDSHour) MarshalJSON() ([]byte, error) {
189279
if o.UnparsedObject != nil {
190280
return json.Marshal(o.UnparsedObject)
191281
}
282+
if o.ApmScannedBytes != nil {
283+
toSerialize["apm_scanned_bytes"] = o.ApmScannedBytes
284+
}
285+
if o.EventsScannedBytes != nil {
286+
toSerialize["events_scanned_bytes"] = o.EventsScannedBytes
287+
}
192288
if o.Hour != nil {
193289
if o.Hour.Nanosecond() == 0 {
194290
toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05Z07:00")
@@ -205,6 +301,9 @@ func (o UsageSDSHour) MarshalJSON() ([]byte, error) {
205301
if o.PublicId != nil {
206302
toSerialize["public_id"] = o.PublicId
207303
}
304+
if o.RumScannedBytes != nil {
305+
toSerialize["rum_scanned_bytes"] = o.RumScannedBytes
306+
}
208307
if o.TotalScannedBytes != nil {
209308
toSerialize["total_scanned_bytes"] = o.TotalScannedBytes
210309
}
@@ -219,11 +318,14 @@ func (o UsageSDSHour) MarshalJSON() ([]byte, error) {
219318
func (o *UsageSDSHour) UnmarshalJSON(bytes []byte) (err error) {
220319
raw := map[string]interface{}{}
221320
all := struct {
222-
Hour *time.Time `json:"hour,omitempty"`
223-
LogsScannedBytes *int64 `json:"logs_scanned_bytes,omitempty"`
224-
OrgName *string `json:"org_name,omitempty"`
225-
PublicId *string `json:"public_id,omitempty"`
226-
TotalScannedBytes *int64 `json:"total_scanned_bytes,omitempty"`
321+
ApmScannedBytes *int64 `json:"apm_scanned_bytes,omitempty"`
322+
EventsScannedBytes *int64 `json:"events_scanned_bytes,omitempty"`
323+
Hour *time.Time `json:"hour,omitempty"`
324+
LogsScannedBytes *int64 `json:"logs_scanned_bytes,omitempty"`
325+
OrgName *string `json:"org_name,omitempty"`
326+
PublicId *string `json:"public_id,omitempty"`
327+
RumScannedBytes *int64 `json:"rum_scanned_bytes,omitempty"`
328+
TotalScannedBytes *int64 `json:"total_scanned_bytes,omitempty"`
227329
}{}
228330
err = json.Unmarshal(bytes, &all)
229331
if err != nil {
@@ -234,10 +336,13 @@ func (o *UsageSDSHour) UnmarshalJSON(bytes []byte) (err error) {
234336
o.UnparsedObject = raw
235337
return nil
236338
}
339+
o.ApmScannedBytes = all.ApmScannedBytes
340+
o.EventsScannedBytes = all.EventsScannedBytes
237341
o.Hour = all.Hour
238342
o.LogsScannedBytes = all.LogsScannedBytes
239343
o.OrgName = all.OrgName
240344
o.PublicId = all.PublicId
345+
o.RumScannedBytes = all.RumScannedBytes
241346
o.TotalScannedBytes = all.TotalScannedBytes
242347
return nil
243348
}

0 commit comments

Comments
 (0)