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.6",
"regenerated": "2025-04-02 20:49:30.088491",
"spec_repo_commit": "9ea284b5"
"regenerated": "2025-04-03 09:26:31.847840",
"spec_repo_commit": "f1a43647"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-02 20:49:30.104275",
"spec_repo_commit": "9ea284b5"
"regenerated": "2025-04-03 09:26:31.864167",
"spec_repo_commit": "f1a43647"
}
}
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13489,6 +13489,10 @@ components:
default: true
description: Show the main body of the alert event.
type: boolean
mute_buttons:
default: false
description: Show interactive buttons to mute the alerting monitor.
type: boolean
notified:
default: true
description: Show the list of @-handles in the alert event.
Expand All @@ -13507,12 +13511,14 @@ components:
example:
- display:
message: true
mute_buttons: true
notified: true
snapshot: true
tags: true
name: '#channel_name_main_account'
- display:
message: true
mute_buttons: true
notified: true
snapshot: false
tags: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static void main(String[] args) {
.display(
new SlackIntegrationChannelDisplay()
.message(true)
.muteButtons(false)
.notified(true)
.snapshot(true)
.tags(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static void main(String[] args) {
.display(
new SlackIntegrationChannelDisplay()
.message(true)
.muteButtons(false)
.notified(true)
.snapshot(true)
.tags(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/** Configuration options for what is shown in an alert event message. */
@JsonPropertyOrder({
SlackIntegrationChannelDisplay.JSON_PROPERTY_MESSAGE,
SlackIntegrationChannelDisplay.JSON_PROPERTY_MUTE_BUTTONS,
SlackIntegrationChannelDisplay.JSON_PROPERTY_NOTIFIED,
SlackIntegrationChannelDisplay.JSON_PROPERTY_SNAPSHOT,
SlackIntegrationChannelDisplay.JSON_PROPERTY_TAGS
Expand All @@ -30,6 +31,9 @@ public class SlackIntegrationChannelDisplay {
public static final String JSON_PROPERTY_MESSAGE = "message";
private Boolean message = true;

public static final String JSON_PROPERTY_MUTE_BUTTONS = "mute_buttons";
private Boolean muteButtons = false;

public static final String JSON_PROPERTY_NOTIFIED = "notified";
private Boolean notified = true;

Expand Down Expand Up @@ -60,6 +64,27 @@ public void setMessage(Boolean message) {
this.message = message;
}

public SlackIntegrationChannelDisplay muteButtons(Boolean muteButtons) {
this.muteButtons = muteButtons;
return this;
}

/**
* Show interactive buttons to mute the alerting monitor.
*
* @return muteButtons
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MUTE_BUTTONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getMuteButtons() {
return muteButtons;
}

public void setMuteButtons(Boolean muteButtons) {
this.muteButtons = muteButtons;
}

public SlackIntegrationChannelDisplay notified(Boolean notified) {
this.notified = notified;
return this;
Expand Down Expand Up @@ -181,6 +206,7 @@ public boolean equals(Object o) {
SlackIntegrationChannelDisplay slackIntegrationChannelDisplay =
(SlackIntegrationChannelDisplay) o;
return Objects.equals(this.message, slackIntegrationChannelDisplay.message)
&& Objects.equals(this.muteButtons, slackIntegrationChannelDisplay.muteButtons)
&& Objects.equals(this.notified, slackIntegrationChannelDisplay.notified)
&& Objects.equals(this.snapshot, slackIntegrationChannelDisplay.snapshot)
&& Objects.equals(this.tags, slackIntegrationChannelDisplay.tags)
Expand All @@ -190,14 +216,15 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(message, notified, snapshot, tags, additionalProperties);
return Objects.hash(message, muteButtons, notified, snapshot, tags, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SlackIntegrationChannelDisplay {\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" muteButtons: ").append(toIndentedString(muteButtons)).append("\n");
sb.append(" notified: ").append(toIndentedString(notified)).append("\n");
sb.append(" snapshot: ").append(toIndentedString(snapshot)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,122 +9,122 @@ Feature: Slack Integration
And a valid "appKeyAuth" key in the system
And an instance of "SlackIntegration" API

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Create a Slack integration channel returns "Bad Request" response
Given new "CreateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Create a Slack integration channel returns "Item Not Found" response
Given new "CreateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 404 Item Not Found

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Create a Slack integration channel returns "OK" response
Given new "CreateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get a Slack integration channel returns "Bad Request" response
Given new "GetSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get a Slack integration channel returns "Item Not Found" response
Given new "GetSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Item Not Found

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get a Slack integration channel returns "OK" response
Given new "GetSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get all channels in a Slack integration returns "Bad Request" response
Given new "GetSlackIntegrationChannels" request
And request contains "account_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get all channels in a Slack integration returns "Item Not Found" response
Given new "GetSlackIntegrationChannels" request
And request contains "account_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Item Not Found

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Get all channels in a Slack integration returns "OK" response
Given new "GetSlackIntegrationChannels" request
And request contains "account_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Remove a Slack integration channel returns "Bad Request" response
Given new "RemoveSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Remove a Slack integration channel returns "Item Not Found" response
Given new "RemoveSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Item Not Found

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Remove a Slack integration channel returns "The channel was removed successfully." response
Given new "RemoveSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 The channel was removed successfully.

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Update a Slack integration channel returns "Bad Request" response
Given new "UpdateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Update a Slack integration channel returns "Item Not Found" response
Given new "UpdateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 404 Item Not Found

@generated @skip @team:DataDog/saas-integrations
@generated @skip @team:DataDog/chat-integrations
Scenario: Update a Slack integration channel returns "OK" response
Given new "UpdateSlackIntegrationChannel" request
And request contains "account_name" parameter from "REPLACE.ME"
And request contains "channel_name" parameter from "REPLACE.ME"
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
When the request is sent
Then the response status is 200 OK