From 2586e6963adb8a8bc30119c1c95d4e156c26856b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 3 Apr 2025 09:28:36 +0000 Subject: [PATCH] Regenerate client from commit f1a43647 of spec repo --- .apigentools-info | 8 ++-- .generator/schemas/v1/openapi.yaml | 6 +++ .../CreateSlackIntegrationChannel.java | 1 + .../UpdateSlackIntegrationChannel.java | 1 + .../model/SlackIntegrationChannelDisplay.java | 29 ++++++++++++- .../client/v1/api/slack_integration.feature | 42 +++++++++---------- 6 files changed, 61 insertions(+), 26 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index ae06adda6fa..512533eeb44 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -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" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 6c4f6966d1a..a0c142ac78b 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -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. @@ -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 diff --git a/examples/v1/slack-integration/CreateSlackIntegrationChannel.java b/examples/v1/slack-integration/CreateSlackIntegrationChannel.java index c29fea01c02..536554f388e 100644 --- a/examples/v1/slack-integration/CreateSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/CreateSlackIntegrationChannel.java @@ -16,6 +16,7 @@ public static void main(String[] args) { .display( new SlackIntegrationChannelDisplay() .message(true) + .muteButtons(false) .notified(true) .snapshot(true) .tags(true)) diff --git a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java index 2705ced47c0..b7a05443380 100644 --- a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java @@ -16,6 +16,7 @@ public static void main(String[] args) { .display( new SlackIntegrationChannelDisplay() .message(true) + .muteButtons(false) .notified(true) .snapshot(true) .tags(true)) diff --git a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java index af3ef80313e..2d01c7eea50 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java +++ b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java @@ -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 @@ -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; @@ -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; @@ -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) @@ -190,7 +216,7 @@ 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 @@ -198,6 +224,7 @@ 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"); diff --git a/src/test/resources/com/datadog/api/client/v1/api/slack_integration.feature b/src/test/resources/com/datadog/api/client/v1/api/slack_integration.feature index fb23f6bd737..35686a8b43f 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/slack_integration.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/slack_integration.feature @@ -9,31 +9,31 @@ 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" @@ -41,7 +41,7 @@ Feature: Slack Integration 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" @@ -49,7 +49,7 @@ Feature: Slack Integration 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" @@ -57,28 +57,28 @@ Feature: Slack Integration 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" @@ -86,7 +86,7 @@ Feature: Slack Integration 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" @@ -94,7 +94,7 @@ Feature: Slack Integration 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" @@ -102,29 +102,29 @@ Feature: Slack Integration 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