Skip to content

Commit 046024f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b2c4e7e8 of spec repo (#3134)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 7a75392 commit 046024f

File tree

7 files changed

+144
-29
lines changed

7 files changed

+144
-29
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.6",
7-
"regenerated": "2025-06-13 19:38:21.038974",
8-
"spec_repo_commit": "6eb36f2b"
7+
"regenerated": "2025-06-16 08:24:57.626858",
8+
"spec_repo_commit": "b2c4e7e8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-13 19:38:21.056601",
13-
"spec_repo_commit": "6eb36f2b"
12+
"regenerated": "2025-06-16 08:24:57.642601",
13+
"spec_repo_commit": "b2c4e7e8"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11095,6 +11095,17 @@ components:
1109511095
- version
1109611096
- name
1109711097
type: object
11098+
DORACustomTags:
11099+
description: A list of user-defined tags. The tags must follow the `key:value`
11100+
pattern. Up to 100 may be added per event.
11101+
example:
11102+
- language:java
11103+
- department:engineering
11104+
items:
11105+
description: Tags in the form of `key:value`.
11106+
type: string
11107+
nullable: true
11108+
type: array
1109811109
DORADeploymentRequest:
1109911110
description: Request to create a DORA deployment event.
1110011111
properties:
@@ -11106,6 +11117,8 @@ components:
1110611117
DORADeploymentRequestAttributes:
1110711118
description: Attributes to create a DORA deployment event.
1110811119
properties:
11120+
custom_tags:
11121+
$ref: '#/components/schemas/DORACustomTags'
1110911122
env:
1111011123
description: Environment name to where the service was deployed.
1111111124
example: staging
@@ -11208,6 +11221,8 @@ components:
1120811221
DORAFailureRequestAttributes:
1120911222
description: Attributes to create a DORA failure event.
1121011223
properties:
11224+
custom_tags:
11225+
$ref: '#/components/schemas/DORACustomTags'
1121111226
env:
1121211227
description: Environment name that was impacted by the failure.
1121311228
example: staging

api/datadogV2/model_dora_deployment_request_attributes.go

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
// DORADeploymentRequestAttributes Attributes to create a DORA deployment event.
1414
type DORADeploymentRequestAttributes struct {
15+
// A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
16+
CustomTags datadog.NullableList[string] `json:"custom_tags,omitempty"`
1517
// Environment name to where the service was deployed.
1618
Env *string `json:"env,omitempty"`
1719
// Unix timestamp when the deployment finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
@@ -53,6 +55,45 @@ func NewDORADeploymentRequestAttributesWithDefaults() *DORADeploymentRequestAttr
5355
return &this
5456
}
5557

58+
// GetCustomTags returns the CustomTags field value if set, zero value otherwise (both if not set or set to explicit null).
59+
func (o *DORADeploymentRequestAttributes) GetCustomTags() []string {
60+
if o == nil || o.CustomTags.Get() == nil {
61+
var ret []string
62+
return ret
63+
}
64+
return *o.CustomTags.Get()
65+
}
66+
67+
// GetCustomTagsOk returns a tuple with the CustomTags field value if set, nil otherwise
68+
// and a boolean to check if the value has been set.
69+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
70+
func (o *DORADeploymentRequestAttributes) GetCustomTagsOk() (*[]string, bool) {
71+
if o == nil {
72+
return nil, false
73+
}
74+
return o.CustomTags.Get(), o.CustomTags.IsSet()
75+
}
76+
77+
// HasCustomTags returns a boolean if a field has been set.
78+
func (o *DORADeploymentRequestAttributes) HasCustomTags() bool {
79+
return o != nil && o.CustomTags.IsSet()
80+
}
81+
82+
// SetCustomTags gets a reference to the given datadog.NullableList[string] and assigns it to the CustomTags field.
83+
func (o *DORADeploymentRequestAttributes) SetCustomTags(v []string) {
84+
o.CustomTags.Set(&v)
85+
}
86+
87+
// SetCustomTagsNil sets the value for CustomTags to be an explicit nil.
88+
func (o *DORADeploymentRequestAttributes) SetCustomTagsNil() {
89+
o.CustomTags.Set(nil)
90+
}
91+
92+
// UnsetCustomTags ensures that no value is present for CustomTags, not even an explicit nil.
93+
func (o *DORADeploymentRequestAttributes) UnsetCustomTags() {
94+
o.CustomTags.Unset()
95+
}
96+
5697
// GetEnv returns the Env field value if set, zero value otherwise.
5798
func (o *DORADeploymentRequestAttributes) GetEnv() string {
5899
if o == nil || o.Env == nil {
@@ -268,6 +309,9 @@ func (o DORADeploymentRequestAttributes) MarshalJSON() ([]byte, error) {
268309
if o.UnparsedObject != nil {
269310
return datadog.Marshal(o.UnparsedObject)
270311
}
312+
if o.CustomTags.IsSet() {
313+
toSerialize["custom_tags"] = o.CustomTags.Get()
314+
}
271315
if o.Env != nil {
272316
toSerialize["env"] = o.Env
273317
}
@@ -296,14 +340,15 @@ func (o DORADeploymentRequestAttributes) MarshalJSON() ([]byte, error) {
296340
// UnmarshalJSON deserializes the given payload.
297341
func (o *DORADeploymentRequestAttributes) UnmarshalJSON(bytes []byte) (err error) {
298342
all := struct {
299-
Env *string `json:"env,omitempty"`
300-
FinishedAt *int64 `json:"finished_at"`
301-
Git *DORAGitInfo `json:"git,omitempty"`
302-
Id *string `json:"id,omitempty"`
303-
Service *string `json:"service"`
304-
StartedAt *int64 `json:"started_at"`
305-
Team *string `json:"team,omitempty"`
306-
Version *string `json:"version,omitempty"`
343+
CustomTags datadog.NullableList[string] `json:"custom_tags,omitempty"`
344+
Env *string `json:"env,omitempty"`
345+
FinishedAt *int64 `json:"finished_at"`
346+
Git *DORAGitInfo `json:"git,omitempty"`
347+
Id *string `json:"id,omitempty"`
348+
Service *string `json:"service"`
349+
StartedAt *int64 `json:"started_at"`
350+
Team *string `json:"team,omitempty"`
351+
Version *string `json:"version,omitempty"`
307352
}{}
308353
if err = datadog.Unmarshal(bytes, &all); err != nil {
309354
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -319,12 +364,13 @@ func (o *DORADeploymentRequestAttributes) UnmarshalJSON(bytes []byte) (err error
319364
}
320365
additionalProperties := make(map[string]interface{})
321366
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
322-
datadog.DeleteKeys(additionalProperties, &[]string{"env", "finished_at", "git", "id", "service", "started_at", "team", "version"})
367+
datadog.DeleteKeys(additionalProperties, &[]string{"custom_tags", "env", "finished_at", "git", "id", "service", "started_at", "team", "version"})
323368
} else {
324369
return err
325370
}
326371

327372
hasInvalidField := false
373+
o.CustomTags = all.CustomTags
328374
o.Env = all.Env
329375
o.FinishedAt = *all.FinishedAt
330376
if all.Git != nil && all.Git.UnparsedObject != nil && o.UnparsedObject == nil {

api/datadogV2/model_dora_failure_request_attributes.go

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
// DORAFailureRequestAttributes Attributes to create a DORA failure event.
1414
type DORAFailureRequestAttributes struct {
15+
// A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
16+
CustomTags datadog.NullableList[string] `json:"custom_tags,omitempty"`
1517
// Environment name that was impacted by the failure.
1618
Env *string `json:"env,omitempty"`
1719
// Unix timestamp when the failure finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
@@ -55,6 +57,45 @@ func NewDORAFailureRequestAttributesWithDefaults() *DORAFailureRequestAttributes
5557
return &this
5658
}
5759

60+
// GetCustomTags returns the CustomTags field value if set, zero value otherwise (both if not set or set to explicit null).
61+
func (o *DORAFailureRequestAttributes) GetCustomTags() []string {
62+
if o == nil || o.CustomTags.Get() == nil {
63+
var ret []string
64+
return ret
65+
}
66+
return *o.CustomTags.Get()
67+
}
68+
69+
// GetCustomTagsOk returns a tuple with the CustomTags field value if set, nil otherwise
70+
// and a boolean to check if the value has been set.
71+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
72+
func (o *DORAFailureRequestAttributes) GetCustomTagsOk() (*[]string, bool) {
73+
if o == nil {
74+
return nil, false
75+
}
76+
return o.CustomTags.Get(), o.CustomTags.IsSet()
77+
}
78+
79+
// HasCustomTags returns a boolean if a field has been set.
80+
func (o *DORAFailureRequestAttributes) HasCustomTags() bool {
81+
return o != nil && o.CustomTags.IsSet()
82+
}
83+
84+
// SetCustomTags gets a reference to the given datadog.NullableList[string] and assigns it to the CustomTags field.
85+
func (o *DORAFailureRequestAttributes) SetCustomTags(v []string) {
86+
o.CustomTags.Set(&v)
87+
}
88+
89+
// SetCustomTagsNil sets the value for CustomTags to be an explicit nil.
90+
func (o *DORAFailureRequestAttributes) SetCustomTagsNil() {
91+
o.CustomTags.Set(nil)
92+
}
93+
94+
// UnsetCustomTags ensures that no value is present for CustomTags, not even an explicit nil.
95+
func (o *DORAFailureRequestAttributes) UnsetCustomTags() {
96+
o.CustomTags.Unset()
97+
}
98+
5899
// GetEnv returns the Env field value if set, zero value otherwise.
59100
func (o *DORAFailureRequestAttributes) GetEnv() string {
60101
if o == nil || o.Env == nil {
@@ -336,6 +377,9 @@ func (o DORAFailureRequestAttributes) MarshalJSON() ([]byte, error) {
336377
if o.UnparsedObject != nil {
337378
return datadog.Marshal(o.UnparsedObject)
338379
}
380+
if o.CustomTags.IsSet() {
381+
toSerialize["custom_tags"] = o.CustomTags.Get()
382+
}
339383
if o.Env != nil {
340384
toSerialize["env"] = o.Env
341385
}
@@ -374,16 +418,17 @@ func (o DORAFailureRequestAttributes) MarshalJSON() ([]byte, error) {
374418
// UnmarshalJSON deserializes the given payload.
375419
func (o *DORAFailureRequestAttributes) UnmarshalJSON(bytes []byte) (err error) {
376420
all := struct {
377-
Env *string `json:"env,omitempty"`
378-
FinishedAt *int64 `json:"finished_at,omitempty"`
379-
Git *DORAGitInfo `json:"git,omitempty"`
380-
Id *string `json:"id,omitempty"`
381-
Name *string `json:"name,omitempty"`
382-
Services []string `json:"services,omitempty"`
383-
Severity *string `json:"severity,omitempty"`
384-
StartedAt *int64 `json:"started_at"`
385-
Team *string `json:"team,omitempty"`
386-
Version *string `json:"version,omitempty"`
421+
CustomTags datadog.NullableList[string] `json:"custom_tags,omitempty"`
422+
Env *string `json:"env,omitempty"`
423+
FinishedAt *int64 `json:"finished_at,omitempty"`
424+
Git *DORAGitInfo `json:"git,omitempty"`
425+
Id *string `json:"id,omitempty"`
426+
Name *string `json:"name,omitempty"`
427+
Services []string `json:"services,omitempty"`
428+
Severity *string `json:"severity,omitempty"`
429+
StartedAt *int64 `json:"started_at"`
430+
Team *string `json:"team,omitempty"`
431+
Version *string `json:"version,omitempty"`
387432
}{}
388433
if err = datadog.Unmarshal(bytes, &all); err != nil {
389434
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -393,12 +438,13 @@ func (o *DORAFailureRequestAttributes) UnmarshalJSON(bytes []byte) (err error) {
393438
}
394439
additionalProperties := make(map[string]interface{})
395440
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
396-
datadog.DeleteKeys(additionalProperties, &[]string{"env", "finished_at", "git", "id", "name", "services", "severity", "started_at", "team", "version"})
441+
datadog.DeleteKeys(additionalProperties, &[]string{"custom_tags", "env", "finished_at", "git", "id", "name", "services", "severity", "started_at", "team", "version"})
397442
} else {
398443
return err
399444
}
400445

401446
hasInvalidField := false
447+
o.CustomTags = all.CustomTags
402448
o.Env = all.Env
403449
o.FinishedAt = all.FinishedAt
404450
if all.Git != nil && all.Git.UnparsedObject != nil && o.UnparsedObject == nil {

examples/v2/dora-metrics/CreateDORAFailure.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ func main() {
1616
body := datadogV2.DORAFailureRequest{
1717
Data: datadogV2.DORAFailureRequestData{
1818
Attributes: datadogV2.DORAFailureRequestAttributes{
19+
CustomTags: *datadog.NewNullableList(&[]string{
20+
"language:java",
21+
"department:engineering",
22+
}),
1923
Env: datadog.PtrString("staging"),
2024
FinishedAt: datadog.PtrInt64(1693491984000000000),
2125
Git: &datadogV2.DORAGitInfo{

examples/v2/dora-metrics/CreateDORAIncident.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ func main() {
1616
body := datadogV2.DORAFailureRequest{
1717
Data: datadogV2.DORAFailureRequestData{
1818
Attributes: datadogV2.DORAFailureRequestAttributes{
19+
CustomTags: *datadog.NewNullableList(&[]string{
20+
"language:java",
21+
"department:engineering",
22+
}),
1923
Env: datadog.PtrString("staging"),
2024
FinishedAt: datadog.PtrInt64(1693491984000000000),
2125
Git: &datadogV2.DORAGitInfo{

tests/scenarios/features/v2/dora_metrics.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Feature: DORA Metrics
7979
@generated @skip @team:DataDog/ci-app-backend
8080
Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response
8181
Given new "CreateDORADeployment" request
82-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
82+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
8383
When the request is sent
8484
Then the response status is 202 OK - but delayed due to incident
8585

@@ -100,7 +100,7 @@ Feature: DORA Metrics
100100
@generated @skip @team:DataDog/ci-app-backend
101101
Scenario: Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
102102
Given new "CreateDORAFailure" request
103-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
103+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
104104
When the request is sent
105105
Then the response status is 202 OK - but delayed due to incident
106106

@@ -114,20 +114,20 @@ Feature: DORA Metrics
114114
@generated @skip @team:DataDog/ci-app-backend
115115
Scenario: Send an incident event for DORA Metrics returns "Bad Request" response
116116
Given new "CreateDORAIncident" request
117-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
117+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
118118
When the request is sent
119119
Then the response status is 400 Bad Request
120120

121121
@generated @skip @team:DataDog/ci-app-backend
122122
Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response
123123
Given new "CreateDORAIncident" request
124-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
124+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
125125
When the request is sent
126126
Then the response status is 202 OK - but delayed due to incident
127127

128128
@generated @skip @team:DataDog/ci-app-backend
129129
Scenario: Send an incident event for DORA Metrics returns "OK" response
130130
Given new "CreateDORAIncident" request
131-
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
131+
And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
132132
When the request is sent
133133
Then the response status is 200 OK

0 commit comments

Comments
 (0)