Skip to content

Commit 2a13386

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 31044eb9 of spec repo (#3176)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d32a82b commit 2a13386

5 files changed

Lines changed: 86 additions & 8 deletions

File tree

.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-25 17:36:54.585671",
8-
"spec_repo_commit": "51c17453"
7+
"regenerated": "2025-06-25 21:28:45.538861",
8+
"spec_repo_commit": "31044eb9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-25 17:36:54.602053",
13-
"spec_repo_commit": "51c17453"
12+
"regenerated": "2025-06-25 21:28:45.554520",
13+
"spec_repo_commit": "31044eb9"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17419,6 +17419,10 @@ components:
1741917419
items:
1742017420
$ref: '#/components/schemas/IncidentTimelineCellCreateAttributes'
1742117421
type: array
17422+
is_test:
17423+
description: A flag indicating whether the incident is a test incident.
17424+
example: false
17425+
type: boolean
1742217426
notification_handles:
1742317427
description: Notification handles that will be notified of the incident
1742417428
at creation.
@@ -17824,6 +17828,10 @@ components:
1782417828
description: A unique identifier that represents an incident type.
1782517829
example: 00000000-0000-0000-0000-000000000000
1782617830
type: string
17831+
is_test:
17832+
description: A flag indicating whether the incident is a test incident.
17833+
example: false
17834+
type: boolean
1782717835
modified:
1782817836
description: Timestamp when the incident was last modified.
1782917837
format: date-time

api/datadogV2/model_incident_create_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ type IncidentCreateAttributes struct {
2222
IncidentTypeUuid *string `json:"incident_type_uuid,omitempty"`
2323
// An array of initial timeline cells to be placed at the beginning of the incident timeline.
2424
InitialCells []IncidentTimelineCellCreateAttributes `json:"initial_cells,omitempty"`
25+
// A flag indicating whether the incident is a test incident.
26+
IsTest *bool `json:"is_test,omitempty"`
2527
// Notification handles that will be notified of the incident at creation.
2628
NotificationHandles []IncidentNotificationHandle `json:"notification_handles,omitempty"`
2729
// The title of the incident, which summarizes what happened.
@@ -185,6 +187,34 @@ func (o *IncidentCreateAttributes) SetInitialCells(v []IncidentTimelineCellCreat
185187
o.InitialCells = v
186188
}
187189

190+
// GetIsTest returns the IsTest field value if set, zero value otherwise.
191+
func (o *IncidentCreateAttributes) GetIsTest() bool {
192+
if o == nil || o.IsTest == nil {
193+
var ret bool
194+
return ret
195+
}
196+
return *o.IsTest
197+
}
198+
199+
// GetIsTestOk returns a tuple with the IsTest field value if set, nil otherwise
200+
// and a boolean to check if the value has been set.
201+
func (o *IncidentCreateAttributes) GetIsTestOk() (*bool, bool) {
202+
if o == nil || o.IsTest == nil {
203+
return nil, false
204+
}
205+
return o.IsTest, true
206+
}
207+
208+
// HasIsTest returns a boolean if a field has been set.
209+
func (o *IncidentCreateAttributes) HasIsTest() bool {
210+
return o != nil && o.IsTest != nil
211+
}
212+
213+
// SetIsTest gets a reference to the given bool and assigns it to the IsTest field.
214+
func (o *IncidentCreateAttributes) SetIsTest(v bool) {
215+
o.IsTest = &v
216+
}
217+
188218
// GetNotificationHandles returns the NotificationHandles field value if set, zero value otherwise.
189219
func (o *IncidentCreateAttributes) GetNotificationHandles() []IncidentNotificationHandle {
190220
if o == nil || o.NotificationHandles == nil {
@@ -255,6 +285,9 @@ func (o IncidentCreateAttributes) MarshalJSON() ([]byte, error) {
255285
if o.InitialCells != nil {
256286
toSerialize["initial_cells"] = o.InitialCells
257287
}
288+
if o.IsTest != nil {
289+
toSerialize["is_test"] = o.IsTest
290+
}
258291
if o.NotificationHandles != nil {
259292
toSerialize["notification_handles"] = o.NotificationHandles
260293
}
@@ -274,6 +307,7 @@ func (o *IncidentCreateAttributes) UnmarshalJSON(bytes []byte) (err error) {
274307
Fields map[string]IncidentFieldAttributes `json:"fields,omitempty"`
275308
IncidentTypeUuid *string `json:"incident_type_uuid,omitempty"`
276309
InitialCells []IncidentTimelineCellCreateAttributes `json:"initial_cells,omitempty"`
310+
IsTest *bool `json:"is_test,omitempty"`
277311
NotificationHandles []IncidentNotificationHandle `json:"notification_handles,omitempty"`
278312
Title *string `json:"title"`
279313
}{}
@@ -288,7 +322,7 @@ func (o *IncidentCreateAttributes) UnmarshalJSON(bytes []byte) (err error) {
288322
}
289323
additionalProperties := make(map[string]interface{})
290324
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
291-
datadog.DeleteKeys(additionalProperties, &[]string{"customer_impact_scope", "customer_impacted", "fields", "incident_type_uuid", "initial_cells", "notification_handles", "title"})
325+
datadog.DeleteKeys(additionalProperties, &[]string{"customer_impact_scope", "customer_impacted", "fields", "incident_type_uuid", "initial_cells", "is_test", "notification_handles", "title"})
292326
} else {
293327
return err
294328
}
@@ -297,6 +331,7 @@ func (o *IncidentCreateAttributes) UnmarshalJSON(bytes []byte) (err error) {
297331
o.Fields = all.Fields
298332
o.IncidentTypeUuid = all.IncidentTypeUuid
299333
o.InitialCells = all.InitialCells
334+
o.IsTest = all.IsTest
300335
o.NotificationHandles = all.NotificationHandles
301336
o.Title = *all.Title
302337

api/datadogV2/model_incident_response_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ type IncidentResponseAttributes struct {
3636
Fields map[string]IncidentFieldAttributes `json:"fields,omitempty"`
3737
// A unique identifier that represents an incident type.
3838
IncidentTypeUuid *string `json:"incident_type_uuid,omitempty"`
39+
// A flag indicating whether the incident is a test incident.
40+
IsTest *bool `json:"is_test,omitempty"`
3941
// Timestamp when the incident was last modified.
4042
Modified *time.Time `json:"modified,omitempty"`
4143
// Incident's non Datadog creator.
@@ -460,6 +462,34 @@ func (o *IncidentResponseAttributes) SetIncidentTypeUuid(v string) {
460462
o.IncidentTypeUuid = &v
461463
}
462464

465+
// GetIsTest returns the IsTest field value if set, zero value otherwise.
466+
func (o *IncidentResponseAttributes) GetIsTest() bool {
467+
if o == nil || o.IsTest == nil {
468+
var ret bool
469+
return ret
470+
}
471+
return *o.IsTest
472+
}
473+
474+
// GetIsTestOk returns a tuple with the IsTest field value if set, nil otherwise
475+
// and a boolean to check if the value has been set.
476+
func (o *IncidentResponseAttributes) GetIsTestOk() (*bool, bool) {
477+
if o == nil || o.IsTest == nil {
478+
return nil, false
479+
}
480+
return o.IsTest, true
481+
}
482+
483+
// HasIsTest returns a boolean if a field has been set.
484+
func (o *IncidentResponseAttributes) HasIsTest() bool {
485+
return o != nil && o.IsTest != nil
486+
}
487+
488+
// SetIsTest gets a reference to the given bool and assigns it to the IsTest field.
489+
func (o *IncidentResponseAttributes) SetIsTest(v bool) {
490+
o.IsTest = &v
491+
}
492+
463493
// GetModified returns the Modified field value if set, zero value otherwise.
464494
func (o *IncidentResponseAttributes) GetModified() time.Time {
465495
if o == nil || o.Modified == nil {
@@ -907,6 +937,9 @@ func (o IncidentResponseAttributes) MarshalJSON() ([]byte, error) {
907937
if o.IncidentTypeUuid != nil {
908938
toSerialize["incident_type_uuid"] = o.IncidentTypeUuid
909939
}
940+
if o.IsTest != nil {
941+
toSerialize["is_test"] = o.IsTest
942+
}
910943
if o.Modified != nil {
911944
if o.Modified.Nanosecond() == 0 {
912945
toSerialize["modified"] = o.Modified.Format("2006-01-02T15:04:05Z07:00")
@@ -969,6 +1002,7 @@ func (o *IncidentResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
9691002
Detected datadog.NullableTime `json:"detected,omitempty"`
9701003
Fields map[string]IncidentFieldAttributes `json:"fields,omitempty"`
9711004
IncidentTypeUuid *string `json:"incident_type_uuid,omitempty"`
1005+
IsTest *bool `json:"is_test,omitempty"`
9721006
Modified *time.Time `json:"modified,omitempty"`
9731007
NonDatadogCreator NullableIncidentNonDatadogCreator `json:"non_datadog_creator,omitempty"`
9741008
NotificationHandles []IncidentNotificationHandle `json:"notification_handles,omitempty"`
@@ -991,7 +1025,7 @@ func (o *IncidentResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
9911025
}
9921026
additionalProperties := make(map[string]interface{})
9931027
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
994-
datadog.DeleteKeys(additionalProperties, &[]string{"archived", "case_id", "created", "customer_impact_duration", "customer_impact_end", "customer_impact_scope", "customer_impact_start", "customer_impacted", "detected", "fields", "incident_type_uuid", "modified", "non_datadog_creator", "notification_handles", "public_id", "resolved", "severity", "state", "time_to_detect", "time_to_internal_response", "time_to_repair", "time_to_resolve", "title", "visibility"})
1028+
datadog.DeleteKeys(additionalProperties, &[]string{"archived", "case_id", "created", "customer_impact_duration", "customer_impact_end", "customer_impact_scope", "customer_impact_start", "customer_impacted", "detected", "fields", "incident_type_uuid", "is_test", "modified", "non_datadog_creator", "notification_handles", "public_id", "resolved", "severity", "state", "time_to_detect", "time_to_internal_response", "time_to_repair", "time_to_resolve", "title", "visibility"})
9951029
} else {
9961030
return err
9971031
}
@@ -1008,6 +1042,7 @@ func (o *IncidentResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
10081042
o.Detected = all.Detected
10091043
o.Fields = all.Fields
10101044
o.IncidentTypeUuid = all.IncidentTypeUuid
1045+
o.IsTest = all.IsTest
10111046
o.Modified = all.Modified
10121047
o.NonDatadogCreator = all.NonDatadogCreator
10131048
o.NotificationHandles = all.NotificationHandles

tests/scenarios/features/v2/incidents.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Feature: Incidents
7070
Scenario: Create an incident returns "Bad Request" response
7171
Given operation "CreateIncident" enabled
7272
And new "CreateIncident" request
73-
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "incident_type_uuid": "00000000-0000-0000-0000-000000000000", "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@user@email.com"}, {"display_name": "Slack Channel", "handle": "@slack-channel"}, {"display_name": "Incident Workflow", "handle": "@workflow-from-incident"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
73+
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "incident_type_uuid": "00000000-0000-0000-0000-000000000000", "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "is_test": false, "notification_handles": [{"display_name": "Jane Doe", "handle": "@user@email.com"}, {"display_name": "Slack Channel", "handle": "@slack-channel"}, {"display_name": "Incident Workflow", "handle": "@workflow-from-incident"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
7474
When the request is sent
7575
Then the response status is 400 Bad Request
7676

@@ -89,7 +89,7 @@ Feature: Incidents
8989
Scenario: Create an incident returns "Not Found" response
9090
Given operation "CreateIncident" enabled
9191
And new "CreateIncident" request
92-
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "incident_type_uuid": "00000000-0000-0000-0000-000000000000", "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@user@email.com"}, {"display_name": "Slack Channel", "handle": "@slack-channel"}, {"display_name": "Incident Workflow", "handle": "@workflow-from-incident"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
92+
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "incident_type_uuid": "00000000-0000-0000-0000-000000000000", "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "is_test": false, "notification_handles": [{"display_name": "Jane Doe", "handle": "@user@email.com"}, {"display_name": "Slack Channel", "handle": "@slack-channel"}, {"display_name": "Incident Workflow", "handle": "@workflow-from-incident"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
9393
When the request is sent
9494
Then the response status is 404 Not Found
9595

0 commit comments

Comments
 (0)