diff --git a/.apigentools-info b/.apigentools-info index a97406ac69f1..914128c275c8 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:26.546832", - "spec_repo_commit": "9ea284b5" + "regenerated": "2025-04-03 09:26:20.623140", + "spec_repo_commit": "f1a43647" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-02 20:49:26.563500", - "spec_repo_commit": "9ea284b5" + "regenerated": "2025-04-03 09:26:20.638579", + "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 6c4f6966d1ad..a0c142ac78b3 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.rb b/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb index bdad87bf563b..72f4f770d646 100644 --- a/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb +++ b/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb @@ -6,6 +6,7 @@ body = DatadogAPIClient::V1::SlackIntegrationChannel.new({ display: DatadogAPIClient::V1::SlackIntegrationChannelDisplay.new({ message: true, + mute_buttons: false, notified: true, snapshot: true, tags: true, diff --git a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb index dddf668289ad..b01484d2531e 100644 --- a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb +++ b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb @@ -6,6 +6,7 @@ body = DatadogAPIClient::V1::SlackIntegrationChannel.new({ display: DatadogAPIClient::V1::SlackIntegrationChannelDisplay.new({ message: true, + mute_buttons: false, notified: true, snapshot: true, tags: true, diff --git a/features/v1/slack_integration.feature b/features/v1/slack_integration.feature index fb23f6bd737a..35686a8b43fc 100644 --- a/features/v1/slack_integration.feature +++ b/features/v1/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 diff --git a/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb b/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb index 7fa9cc25980b..e219eee84cfa 100644 --- a/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb +++ b/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb @@ -24,6 +24,9 @@ class SlackIntegrationChannelDisplay # Show the main body of the alert event. attr_accessor :message + # Show interactive buttons to mute the alerting monitor. + attr_accessor :mute_buttons + # Show the list of @-handles in the alert event. attr_accessor :notified @@ -40,6 +43,7 @@ class SlackIntegrationChannelDisplay def self.attribute_map { :'message' => :'message', + :'mute_buttons' => :'mute_buttons', :'notified' => :'notified', :'snapshot' => :'snapshot', :'tags' => :'tags' @@ -51,6 +55,7 @@ def self.attribute_map def self.openapi_types { :'message' => :'Boolean', + :'mute_buttons' => :'Boolean', :'notified' => :'Boolean', :'snapshot' => :'Boolean', :'tags' => :'Boolean' @@ -79,6 +84,10 @@ def initialize(attributes = {}) self.message = attributes[:'message'] end + if attributes.key?(:'mute_buttons') + self.mute_buttons = attributes[:'mute_buttons'] + end + if attributes.key?(:'notified') self.notified = attributes[:'notified'] end @@ -119,6 +128,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && message == o.message && + mute_buttons == o.mute_buttons && notified == o.notified && snapshot == o.snapshot && tags == o.tags && @@ -129,7 +139,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [message, notified, snapshot, tags, additional_properties].hash + [message, mute_buttons, notified, snapshot, tags, additional_properties].hash end end end