Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46771,11 +46771,6 @@ components:
description: An optional message shown to users when they declare an incident of this type.
example: "Create an incident here"
type: string
disable_out_of_the_box_postmortem_template:
default: false
description: Whether the out-of-the-box postmortem template is disabled for incidents of this type.
example: false
type: boolean
editable_timestamps:
default: false
description: Whether responders can edit incident timestamps for incidents of this type.
Expand Down
18 changes: 0 additions & 18 deletions src/datadogV2/model/model_incident_type_configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ pub struct IncidentTypeConfiguration {
/// An optional message shown to users when they declare an incident of this type.
#[serde(rename = "create_message")]
pub create_message: Option<String>,
/// Whether the out-of-the-box postmortem template is disabled for incidents of this type.
#[serde(rename = "disable_out_of_the_box_postmortem_template")]
pub disable_out_of_the_box_postmortem_template: Option<bool>,
/// Whether responders can edit incident timestamps for incidents of this type.
#[serde(rename = "editable_timestamps")]
pub editable_timestamps: Option<bool>,
Expand Down Expand Up @@ -51,7 +48,6 @@ impl IncidentTypeConfiguration {
allow_incident_deletion: None,
allow_workflows: None,
create_message: None,
disable_out_of_the_box_postmortem_template: None,
editable_timestamps: None,
private_incidents: None,
private_incidents_by_default: None,
Expand All @@ -77,11 +73,6 @@ impl IncidentTypeConfiguration {
self
}

pub fn disable_out_of_the_box_postmortem_template(mut self, value: bool) -> Self {
self.disable_out_of_the_box_postmortem_template = Some(value);
self
}

pub fn editable_timestamps(mut self, value: bool) -> Self {
self.editable_timestamps = Some(value);
self
Expand Down Expand Up @@ -142,7 +133,6 @@ impl<'de> Deserialize<'de> for IncidentTypeConfiguration {
let mut allow_incident_deletion: Option<bool> = None;
let mut allow_workflows: Option<bool> = None;
let mut create_message: Option<String> = None;
let mut disable_out_of_the_box_postmortem_template: Option<bool> = None;
let mut editable_timestamps: Option<bool> = None;
let mut private_incidents: Option<bool> = None;
let mut private_incidents_by_default: Option<bool> = None;
Expand Down Expand Up @@ -177,13 +167,6 @@ impl<'de> Deserialize<'de> for IncidentTypeConfiguration {
create_message =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"disable_out_of_the_box_postmortem_template" => {
if v.is_null() {
continue;
}
disable_out_of_the_box_postmortem_template =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"editable_timestamps" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -239,7 +222,6 @@ impl<'de> Deserialize<'de> for IncidentTypeConfiguration {
allow_incident_deletion,
allow_workflows,
create_message,
disable_out_of_the_box_postmortem_template,
editable_timestamps,
private_incidents,
private_incidents_by_default,
Expand Down
8 changes: 4 additions & 4 deletions tests/scenarios/features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Feature: Incidents
Scenario: Create an incident type returns "Bad Request" response
Given operation "CreateIncidentType" enabled
And new "CreateIncidentType" request
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -182,7 +182,7 @@ Feature: Incidents
Scenario: Create an incident type returns "Not Found" response
Given operation "CreateIncidentType" enabled
And new "CreateIncidentType" request
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down Expand Up @@ -1298,7 +1298,7 @@ Feature: Incidents
Given operation "UpdateIncidentType" enabled
And new "UpdateIncidentType" request
And request contains "incident_type_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -1307,7 +1307,7 @@ Feature: Incidents
Given operation "UpdateIncidentType" enabled
And new "UpdateIncidentType" request
And request contains "incident_type_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down
Loading