diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 731b9e51606..9253398e02a 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -46229,6 +46229,9 @@ components:
IncidentTypeAttributes:
description: Incident type's attributes.
properties:
+ configuration:
+ $ref: "#/components/schemas/IncidentTypeConfiguration"
+ readOnly: true
createdAt:
description: Timestamp when the incident type was created.
format: date-time
@@ -46270,6 +46273,53 @@ components:
required:
- name
type: object
+ IncidentTypeConfiguration:
+ description: >-
+ The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
+ properties:
+ allow_incident_deletion:
+ default: false
+ description: Whether incidents of this type can be deleted.
+ example: false
+ type: boolean
+ allow_workflows:
+ default: true
+ description: Whether automation workflows can be triggered for incidents of this type.
+ example: true
+ type: boolean
+ create_message:
+ 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.
+ example: false
+ type: boolean
+ private_incidents:
+ default: false
+ description: >-
+ Whether responders can create private incidents of this type. This is an opt-in setting, distinct from `private_incidents_by_default`, which controls whether incidents are created private automatically.
+ example: false
+ type: boolean
+ private_incidents_by_default:
+ default: false
+ description: Whether incidents of this type are created as private by default.
+ example: false
+ type: boolean
+ slug_source:
+ $ref: "#/components/schemas/IncidentTypeSlugSource"
+ test_incidents:
+ default: true
+ description: Whether incidents of this type are treated as test incidents.
+ example: true
+ type: boolean
+ type: object
IncidentTypeCreateData:
description: Incident type data for a create request.
properties:
@@ -46364,6 +46414,18 @@ components:
required:
- data
type: object
+ IncidentTypeSlugSource:
+ default: default
+ description: >-
+ When set to `servicenow`, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
+ enum:
+ - default
+ - servicenow
+ example: default
+ type: string
+ x-enum-varnames:
+ - DEFAULT
+ - SERVICENOW
IncidentTypeType:
default: incident_types
description: Incident type resource type.
@@ -46376,6 +46438,8 @@ components:
IncidentTypeUpdateAttributes:
description: Incident type's attributes for updates.
properties:
+ configuration:
+ $ref: "#/components/schemas/IncidentTypeConfiguration"
createdAt:
description: Timestamp when the incident type was created.
format: date-time
diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeAttributes.java
index 35c4ad0610c..11d0da3df07 100644
--- a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeAttributes.java
+++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeAttributes.java
@@ -20,6 +20,7 @@
/** Incident type's attributes. */
@JsonPropertyOrder({
+ IncidentTypeAttributes.JSON_PROPERTY_CONFIGURATION,
IncidentTypeAttributes.JSON_PROPERTY_CREATED_AT,
IncidentTypeAttributes.JSON_PROPERTY_CREATED_BY,
IncidentTypeAttributes.JSON_PROPERTY_DESCRIPTION,
@@ -33,6 +34,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class IncidentTypeAttributes {
@JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
+ private IncidentTypeConfiguration configuration;
+
public static final String JSON_PROPERTY_CREATED_AT = "createdAt";
private OffsetDateTime createdAt;
@@ -65,6 +69,30 @@ public IncidentTypeAttributes(
this.name = name;
}
+ public IncidentTypeAttributes configuration(IncidentTypeConfiguration configuration) {
+ this.configuration = configuration;
+ this.unparsed |= configuration.unparsed;
+ return this;
+ }
+
+ /**
+ * The incident-type-scoped behavior settings. All fields are optional on update. Any field
+ * omitted from a PATCH request keeps its current value. This object is read-only on the incident
+ * type resource itself and is only mutated through the update (PATCH) endpoint.
+ *
+ * @return configuration
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CONFIGURATION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public IncidentTypeConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(IncidentTypeConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
/**
* Timestamp when the incident type was created.
*
@@ -244,7 +272,8 @@ public boolean equals(Object o) {
return false;
}
IncidentTypeAttributes incidentTypeAttributes = (IncidentTypeAttributes) o;
- return Objects.equals(this.createdAt, incidentTypeAttributes.createdAt)
+ return Objects.equals(this.configuration, incidentTypeAttributes.configuration)
+ && Objects.equals(this.createdAt, incidentTypeAttributes.createdAt)
&& Objects.equals(this.createdBy, incidentTypeAttributes.createdBy)
&& Objects.equals(this.description, incidentTypeAttributes.description)
&& Objects.equals(this.isDefault, incidentTypeAttributes.isDefault)
@@ -258,6 +287,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
+ configuration,
createdAt,
createdBy,
description,
@@ -273,6 +303,7 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IncidentTypeAttributes {\n");
+ sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeConfiguration.java
new file mode 100644
index 00000000000..a02ea09f82e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeConfiguration.java
@@ -0,0 +1,389 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted
+ * from a PATCH request keeps its current value. This object is read-only on the incident type
+ * resource itself and is only mutated through the update (PATCH) endpoint.
+ */
+@JsonPropertyOrder({
+ IncidentTypeConfiguration.JSON_PROPERTY_ALLOW_INCIDENT_DELETION,
+ IncidentTypeConfiguration.JSON_PROPERTY_ALLOW_WORKFLOWS,
+ IncidentTypeConfiguration.JSON_PROPERTY_CREATE_MESSAGE,
+ IncidentTypeConfiguration.JSON_PROPERTY_DISABLE_OUT_OF_THE_BOX_POSTMORTEM_TEMPLATE,
+ IncidentTypeConfiguration.JSON_PROPERTY_EDITABLE_TIMESTAMPS,
+ IncidentTypeConfiguration.JSON_PROPERTY_PRIVATE_INCIDENTS,
+ IncidentTypeConfiguration.JSON_PROPERTY_PRIVATE_INCIDENTS_BY_DEFAULT,
+ IncidentTypeConfiguration.JSON_PROPERTY_SLUG_SOURCE,
+ IncidentTypeConfiguration.JSON_PROPERTY_TEST_INCIDENTS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class IncidentTypeConfiguration {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ALLOW_INCIDENT_DELETION = "allow_incident_deletion";
+ private Boolean allowIncidentDeletion = false;
+
+ public static final String JSON_PROPERTY_ALLOW_WORKFLOWS = "allow_workflows";
+ private Boolean allowWorkflows = true;
+
+ public static final String JSON_PROPERTY_CREATE_MESSAGE = "create_message";
+ private String createMessage;
+
+ public static final String JSON_PROPERTY_DISABLE_OUT_OF_THE_BOX_POSTMORTEM_TEMPLATE =
+ "disable_out_of_the_box_postmortem_template";
+ private Boolean disableOutOfTheBoxPostmortemTemplate = false;
+
+ public static final String JSON_PROPERTY_EDITABLE_TIMESTAMPS = "editable_timestamps";
+ private Boolean editableTimestamps = false;
+
+ public static final String JSON_PROPERTY_PRIVATE_INCIDENTS = "private_incidents";
+ private Boolean privateIncidents = false;
+
+ public static final String JSON_PROPERTY_PRIVATE_INCIDENTS_BY_DEFAULT =
+ "private_incidents_by_default";
+ private Boolean privateIncidentsByDefault = false;
+
+ public static final String JSON_PROPERTY_SLUG_SOURCE = "slug_source";
+ private IncidentTypeSlugSource slugSource = IncidentTypeSlugSource.DEFAULT;
+
+ public static final String JSON_PROPERTY_TEST_INCIDENTS = "test_incidents";
+ private Boolean testIncidents = true;
+
+ public IncidentTypeConfiguration allowIncidentDeletion(Boolean allowIncidentDeletion) {
+ this.allowIncidentDeletion = allowIncidentDeletion;
+ return this;
+ }
+
+ /**
+ * Whether incidents of this type can be deleted.
+ *
+ * @return allowIncidentDeletion
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ALLOW_INCIDENT_DELETION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getAllowIncidentDeletion() {
+ return allowIncidentDeletion;
+ }
+
+ public void setAllowIncidentDeletion(Boolean allowIncidentDeletion) {
+ this.allowIncidentDeletion = allowIncidentDeletion;
+ }
+
+ public IncidentTypeConfiguration allowWorkflows(Boolean allowWorkflows) {
+ this.allowWorkflows = allowWorkflows;
+ return this;
+ }
+
+ /**
+ * Whether automation workflows can be triggered for incidents of this type.
+ *
+ * @return allowWorkflows
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ALLOW_WORKFLOWS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getAllowWorkflows() {
+ return allowWorkflows;
+ }
+
+ public void setAllowWorkflows(Boolean allowWorkflows) {
+ this.allowWorkflows = allowWorkflows;
+ }
+
+ public IncidentTypeConfiguration createMessage(String createMessage) {
+ this.createMessage = createMessage;
+ return this;
+ }
+
+ /**
+ * An optional message shown to users when they declare an incident of this type.
+ *
+ * @return createMessage
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATE_MESSAGE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCreateMessage() {
+ return createMessage;
+ }
+
+ public void setCreateMessage(String createMessage) {
+ this.createMessage = createMessage;
+ }
+
+ public IncidentTypeConfiguration disableOutOfTheBoxPostmortemTemplate(
+ Boolean disableOutOfTheBoxPostmortemTemplate) {
+ this.disableOutOfTheBoxPostmortemTemplate = disableOutOfTheBoxPostmortemTemplate;
+ return this;
+ }
+
+ /**
+ * Whether the out-of-the-box postmortem template is disabled for incidents of this type.
+ *
+ * @return disableOutOfTheBoxPostmortemTemplate
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DISABLE_OUT_OF_THE_BOX_POSTMORTEM_TEMPLATE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getDisableOutOfTheBoxPostmortemTemplate() {
+ return disableOutOfTheBoxPostmortemTemplate;
+ }
+
+ public void setDisableOutOfTheBoxPostmortemTemplate(
+ Boolean disableOutOfTheBoxPostmortemTemplate) {
+ this.disableOutOfTheBoxPostmortemTemplate = disableOutOfTheBoxPostmortemTemplate;
+ }
+
+ public IncidentTypeConfiguration editableTimestamps(Boolean editableTimestamps) {
+ this.editableTimestamps = editableTimestamps;
+ return this;
+ }
+
+ /**
+ * Whether responders can edit incident timestamps for incidents of this type.
+ *
+ * @return editableTimestamps
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_EDITABLE_TIMESTAMPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getEditableTimestamps() {
+ return editableTimestamps;
+ }
+
+ public void setEditableTimestamps(Boolean editableTimestamps) {
+ this.editableTimestamps = editableTimestamps;
+ }
+
+ public IncidentTypeConfiguration privateIncidents(Boolean privateIncidents) {
+ this.privateIncidents = privateIncidents;
+ return this;
+ }
+
+ /**
+ * Whether responders can create private incidents of this type. This is an opt-in setting,
+ * distinct from private_incidents_by_default, which controls whether incidents are
+ * created private automatically.
+ *
+ * @return privateIncidents
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PRIVATE_INCIDENTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getPrivateIncidents() {
+ return privateIncidents;
+ }
+
+ public void setPrivateIncidents(Boolean privateIncidents) {
+ this.privateIncidents = privateIncidents;
+ }
+
+ public IncidentTypeConfiguration privateIncidentsByDefault(Boolean privateIncidentsByDefault) {
+ this.privateIncidentsByDefault = privateIncidentsByDefault;
+ return this;
+ }
+
+ /**
+ * Whether incidents of this type are created as private by default.
+ *
+ * @return privateIncidentsByDefault
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PRIVATE_INCIDENTS_BY_DEFAULT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getPrivateIncidentsByDefault() {
+ return privateIncidentsByDefault;
+ }
+
+ public void setPrivateIncidentsByDefault(Boolean privateIncidentsByDefault) {
+ this.privateIncidentsByDefault = privateIncidentsByDefault;
+ }
+
+ public IncidentTypeConfiguration slugSource(IncidentTypeSlugSource slugSource) {
+ this.slugSource = slugSource;
+ this.unparsed |= !slugSource.isValid();
+ return this;
+ }
+
+ /**
+ * When set to servicenow, incidents will display the ServiceNow record ID instead of
+ * the public ID. If no ServiceNow integration exists, the public ID will be displayed.
+ *
+ * @return slugSource
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SLUG_SOURCE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public IncidentTypeSlugSource getSlugSource() {
+ return slugSource;
+ }
+
+ public void setSlugSource(IncidentTypeSlugSource slugSource) {
+ if (!slugSource.isValid()) {
+ this.unparsed = true;
+ }
+ this.slugSource = slugSource;
+ }
+
+ public IncidentTypeConfiguration testIncidents(Boolean testIncidents) {
+ this.testIncidents = testIncidents;
+ return this;
+ }
+
+ /**
+ * Whether incidents of this type are treated as test incidents.
+ *
+ * @return testIncidents
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TEST_INCIDENTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getTestIncidents() {
+ return testIncidents;
+ }
+
+ public void setTestIncidents(Boolean testIncidents) {
+ this.testIncidents = testIncidents;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return IncidentTypeConfiguration
+ */
+ @JsonAnySetter
+ public IncidentTypeConfiguration putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this IncidentTypeConfiguration object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ IncidentTypeConfiguration incidentTypeConfiguration = (IncidentTypeConfiguration) o;
+ return Objects.equals(
+ this.allowIncidentDeletion, incidentTypeConfiguration.allowIncidentDeletion)
+ && Objects.equals(this.allowWorkflows, incidentTypeConfiguration.allowWorkflows)
+ && Objects.equals(this.createMessage, incidentTypeConfiguration.createMessage)
+ && Objects.equals(
+ this.disableOutOfTheBoxPostmortemTemplate,
+ incidentTypeConfiguration.disableOutOfTheBoxPostmortemTemplate)
+ && Objects.equals(this.editableTimestamps, incidentTypeConfiguration.editableTimestamps)
+ && Objects.equals(this.privateIncidents, incidentTypeConfiguration.privateIncidents)
+ && Objects.equals(
+ this.privateIncidentsByDefault, incidentTypeConfiguration.privateIncidentsByDefault)
+ && Objects.equals(this.slugSource, incidentTypeConfiguration.slugSource)
+ && Objects.equals(this.testIncidents, incidentTypeConfiguration.testIncidents)
+ && Objects.equals(
+ this.additionalProperties, incidentTypeConfiguration.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ allowIncidentDeletion,
+ allowWorkflows,
+ createMessage,
+ disableOutOfTheBoxPostmortemTemplate,
+ editableTimestamps,
+ privateIncidents,
+ privateIncidentsByDefault,
+ slugSource,
+ testIncidents,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class IncidentTypeConfiguration {\n");
+ sb.append(" allowIncidentDeletion: ")
+ .append(toIndentedString(allowIncidentDeletion))
+ .append("\n");
+ sb.append(" allowWorkflows: ").append(toIndentedString(allowWorkflows)).append("\n");
+ sb.append(" createMessage: ").append(toIndentedString(createMessage)).append("\n");
+ sb.append(" disableOutOfTheBoxPostmortemTemplate: ")
+ .append(toIndentedString(disableOutOfTheBoxPostmortemTemplate))
+ .append("\n");
+ sb.append(" editableTimestamps: ").append(toIndentedString(editableTimestamps)).append("\n");
+ sb.append(" privateIncidents: ").append(toIndentedString(privateIncidents)).append("\n");
+ sb.append(" privateIncidentsByDefault: ")
+ .append(toIndentedString(privateIncidentsByDefault))
+ .append("\n");
+ sb.append(" slugSource: ").append(toIndentedString(slugSource)).append("\n");
+ sb.append(" testIncidents: ").append(toIndentedString(testIncidents)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeSlugSource.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeSlugSource.java
new file mode 100644
index 00000000000..825f0a0b59b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeSlugSource.java
@@ -0,0 +1,60 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * When set to servicenow, incidents will display the ServiceNow record ID instead of
+ * the public ID. If no ServiceNow integration exists, the public ID will be displayed.
+ */
+@JsonSerialize(using = IncidentTypeSlugSource.IncidentTypeSlugSourceSerializer.class)
+public class IncidentTypeSlugSource extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("default", "servicenow"));
+
+ public static final IncidentTypeSlugSource DEFAULT = new IncidentTypeSlugSource("default");
+ public static final IncidentTypeSlugSource SERVICENOW = new IncidentTypeSlugSource("servicenow");
+
+ IncidentTypeSlugSource(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class IncidentTypeSlugSourceSerializer
+ extends StdSerializer {
+ public IncidentTypeSlugSourceSerializer(Class t) {
+ super(t);
+ }
+
+ public IncidentTypeSlugSourceSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ IncidentTypeSlugSource value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static IncidentTypeSlugSource fromValue(String value) {
+ return new IncidentTypeSlugSource(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeUpdateAttributes.java
index ce9e62cd60e..96d302e40d6 100644
--- a/src/main/java/com/datadog/api/client/v2/model/IncidentTypeUpdateAttributes.java
+++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTypeUpdateAttributes.java
@@ -19,6 +19,7 @@
/** Incident type's attributes for updates. */
@JsonPropertyOrder({
+ IncidentTypeUpdateAttributes.JSON_PROPERTY_CONFIGURATION,
IncidentTypeUpdateAttributes.JSON_PROPERTY_CREATED_AT,
IncidentTypeUpdateAttributes.JSON_PROPERTY_CREATED_BY,
IncidentTypeUpdateAttributes.JSON_PROPERTY_DESCRIPTION,
@@ -32,6 +33,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class IncidentTypeUpdateAttributes {
@JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
+ private IncidentTypeConfiguration configuration;
+
public static final String JSON_PROPERTY_CREATED_AT = "createdAt";
private OffsetDateTime createdAt;
@@ -56,6 +60,30 @@ public class IncidentTypeUpdateAttributes {
public static final String JSON_PROPERTY_PREFIX = "prefix";
private String prefix;
+ public IncidentTypeUpdateAttributes configuration(IncidentTypeConfiguration configuration) {
+ this.configuration = configuration;
+ this.unparsed |= configuration.unparsed;
+ return this;
+ }
+
+ /**
+ * The incident-type-scoped behavior settings. All fields are optional on update. Any field
+ * omitted from a PATCH request keeps its current value. This object is read-only on the incident
+ * type resource itself and is only mutated through the update (PATCH) endpoint.
+ *
+ * @return configuration
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CONFIGURATION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public IncidentTypeConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(IncidentTypeConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
/**
* Timestamp when the incident type was created.
*
@@ -236,7 +264,8 @@ public boolean equals(Object o) {
return false;
}
IncidentTypeUpdateAttributes incidentTypeUpdateAttributes = (IncidentTypeUpdateAttributes) o;
- return Objects.equals(this.createdAt, incidentTypeUpdateAttributes.createdAt)
+ return Objects.equals(this.configuration, incidentTypeUpdateAttributes.configuration)
+ && Objects.equals(this.createdAt, incidentTypeUpdateAttributes.createdAt)
&& Objects.equals(this.createdBy, incidentTypeUpdateAttributes.createdBy)
&& Objects.equals(this.description, incidentTypeUpdateAttributes.description)
&& Objects.equals(this.isDefault, incidentTypeUpdateAttributes.isDefault)
@@ -251,6 +280,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
+ configuration,
createdAt,
createdBy,
description,
@@ -266,6 +296,7 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IncidentTypeUpdateAttributes {\n");
+ sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
diff --git a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature
index e30ccb25292..646ec88d879 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature
+++ b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature
@@ -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": {"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", "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"}}
When the request is sent
Then the response status is 400 Bad Request
@@ -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": {"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", "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"}}
When the request is sent
Then the response status is 404 Not Found
@@ -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": {"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", "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"}}
When the request is sent
Then the response status is 400 Bad Request
@@ -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": {"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", "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"}}
When the request is sent
Then the response status is 404 Not Found