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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-01 17:21:10.702976",
"spec_repo_commit": "4d58341b"
"regenerated": "2023-05-01 17:52:56.443984",
"spec_repo_commit": "6b2e8b39"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-01 17:21:10.716036",
"spec_repo_commit": "4d58341b"
"regenerated": "2023-05-01 17:52:56.457713",
"spec_repo_commit": "6b2e8b39"
}
}
}
5 changes: 5 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4498,6 +4498,11 @@ components:
IncidentCreateAttributes:
description: The incident's attributes for a create request.
properties:
customer_impact_scope:
description: Required if `customer_impacted:"true"`. A summary of the impact
customers experienced during the incident.
example: Example customer impact scope
type: string
customer_impacted:
description: A flag indicating whether the incident caused customer impact.
example: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/** The incident's attributes for a create request. */
@JsonPropertyOrder({
IncidentCreateAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE,
IncidentCreateAttributes.JSON_PROPERTY_CUSTOMER_IMPACTED,
IncidentCreateAttributes.JSON_PROPERTY_FIELDS,
IncidentCreateAttributes.JSON_PROPERTY_INITIAL_CELLS,
Expand All @@ -29,6 +30,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class IncidentCreateAttributes {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE = "customer_impact_scope";
private String customerImpactScope;

public static final String JSON_PROPERTY_CUSTOMER_IMPACTED = "customer_impacted";
private Boolean customerImpacted;

Expand All @@ -55,6 +59,28 @@ public IncidentCreateAttributes(
this.title = title;
}

public IncidentCreateAttributes customerImpactScope(String customerImpactScope) {
this.customerImpactScope = customerImpactScope;
return this;
}

/**
* Required if <code>customer_impacted:"true"</code>. A summary of the impact customers
* experienced during the incident.
*
* @return customerImpactScope
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCustomerImpactScope() {
return customerImpactScope;
}

public void setCustomerImpactScope(String customerImpactScope) {
this.customerImpactScope = customerImpactScope;
}

public IncidentCreateAttributes customerImpacted(Boolean customerImpacted) {
this.customerImpacted = customerImpacted;
return this;
Expand Down Expand Up @@ -204,7 +230,8 @@ public boolean equals(Object o) {
return false;
}
IncidentCreateAttributes incidentCreateAttributes = (IncidentCreateAttributes) o;
return Objects.equals(this.customerImpacted, incidentCreateAttributes.customerImpacted)
return Objects.equals(this.customerImpactScope, incidentCreateAttributes.customerImpactScope)
&& Objects.equals(this.customerImpacted, incidentCreateAttributes.customerImpacted)
&& Objects.equals(this.fields, incidentCreateAttributes.fields)
&& Objects.equals(this.initialCells, incidentCreateAttributes.initialCells)
&& Objects.equals(this.notificationHandles, incidentCreateAttributes.notificationHandles)
Expand All @@ -213,13 +240,17 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(customerImpacted, fields, initialCells, notificationHandles, title);
return Objects.hash(
customerImpactScope, customerImpacted, fields, initialCells, notificationHandles, title);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IncidentCreateAttributes {\n");
sb.append(" customerImpactScope: ")
.append(toIndentedString(customerImpactScope))
.append("\n");
sb.append(" customerImpacted: ").append(toIndentedString(customerImpacted)).append("\n");
sb.append(" fields: ").append(toIndentedString(fields)).append("\n");
sb.append(" initialCells: ").append(toIndentedString(initialCells)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Feature: Incidents
Scenario: Create an incident returns "Bad Request" response
Given operation "CreateIncident" enabled
And new "CreateIncident" request
And body with value {"data": {"attributes": {"customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -86,7 +86,7 @@ Feature: Incidents
Scenario: Create an incident returns "Not Found" response
Given operation "CreateIncident" enabled
And new "CreateIncident" request
And body with value {"data": {"attributes": {"customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down