Skip to content
Open
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
589 changes: 589 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create a target audience returns "CREATED" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new

body = DatadogAPIClient::V2::GoogleChatTargetAudienceCreateRequest.new({
data: DatadogAPIClient::V2::GoogleChatTargetAudienceCreateRequestData.new({
attributes: DatadogAPIClient::V2::GoogleChatTargetAudienceCreateRequestAttributes.new({
audience_id: "fake-audience-id-1",
audience_name: "fake audience name 1",
}),
type: DatadogAPIClient::V2::GoogleChatTargetAudienceType::GOOGLE_CHAT_TARGET_AUDIENCE_TYPE,
}),
})
p api_instance.create_google_chat_target_audience("organization_binding_id", body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete the delegated user returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
api_instance.delete_google_chat_delegated_user("organization_binding_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a Google Chat organization binding returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
api_instance.delete_google_chat_organization("organization_binding_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a target audience returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
api_instance.delete_google_chat_target_audience("organization_binding_id", "target_audience_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get the delegated user returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
p api_instance.get_google_chat_delegated_user("organization_binding_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a Google Chat organization binding returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
p api_instance.get_google_chat_organization("organization_binding_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a target audience returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
p api_instance.get_google_chat_target_audience("organization_binding_id", "target_audience_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get all Google Chat organization bindings returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
p api_instance.list_google_chat_organizations()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get all target audiences returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new
p api_instance.list_google_chat_target_audiences("organization_binding_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Update a target audience returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new

body = DatadogAPIClient::V2::GoogleChatTargetAudienceUpdateRequest.new({
data: DatadogAPIClient::V2::GoogleChatTargetAudienceUpdateRequestData.new({
attributes: DatadogAPIClient::V2::GoogleChatTargetAudienceUpdateRequestAttributes.new({
audience_id: "fake-audience-id-1",
audience_name: "fake audience name 1",
}),
type: DatadogAPIClient::V2::GoogleChatTargetAudienceType::GOOGLE_CHAT_TARGET_AUDIENCE_TYPE,
}),
})
p api_instance.update_google_chat_target_audience("organization_binding_id", "target_audience_id", body)
32 changes: 32 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3402,6 +3402,18 @@
"domain_name" => "String",
"space_display_name" => "String",
},
"v2.DeleteGoogleChatOrganization" => {
"organization_binding_id" => "String",
},
"v2.GetGoogleChatOrganization" => {
"organization_binding_id" => "String",
},
"v2.DeleteGoogleChatDelegatedUser" => {
"organization_binding_id" => "String",
},
"v2.GetGoogleChatDelegatedUser" => {
"organization_binding_id" => "String",
},
"v2.ListOrganizationHandles" => {
"organization_binding_id" => "String",
},
Expand All @@ -3422,6 +3434,26 @@
"handle_id" => "String",
"body" => "GoogleChatUpdateOrganizationHandleRequest",
},
"v2.ListGoogleChatTargetAudiences" => {
"organization_binding_id" => "String",
},
"v2.CreateGoogleChatTargetAudience" => {
"organization_binding_id" => "String",
"body" => "GoogleChatTargetAudienceCreateRequest",
},
"v2.DeleteGoogleChatTargetAudience" => {
"organization_binding_id" => "String",
"target_audience_id" => "String",
},
"v2.GetGoogleChatTargetAudience" => {
"organization_binding_id" => "String",
"target_audience_id" => "String",
},
"v2.UpdateGoogleChatTargetAudience" => {
"organization_binding_id" => "String",
"target_audience_id" => "String",
"body" => "GoogleChatTargetAudienceUpdateRequest",
},
"v2.DeleteJiraAccount" => {
"account_id" => "UUID",
},
Expand Down
16 changes: 16 additions & 0 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,22 @@
"tag": "Google Chat Integration",
"operationId": "CreateOrganizationHandle"
},
{
"parameters": [
{
"name": "organization_binding_id",
"value": "\"e54cb570-c674-529c-769d-84b312288ed7\""
},
{
"name": "body",
"value": "{\n \"data\": {\n \"type\": \"google-chat-target-audience\",\n \"attributes\": {\n \"audience_name\": \"{{ unique }}\",\n \"audience_id\": \"{{ unique }}\"\n }\n }\n}"
}
],
"step": "there is a valid \"google_chat_target_audience\" in the system",
"key": "google_chat_target_audience",
"tag": "Google Chat Integration",
"operationId": "CreateGoogleChatTargetAudience"
},
{
"parameters": [
{
Expand Down
167 changes: 167 additions & 0 deletions features/v2/google_chat_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,38 @@ Feature: Google Chat Integration
And a valid "appKeyAuth" key in the system
And an instance of "GoogleChatIntegration" API

@generated @skip @team:DataDog/chat-integrations
Scenario: Create a target audience returns "Bad Request" response
Given new "CreateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/chat-integrations
Scenario: Create a target audience returns "CREATED" response
Given new "CreateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 201 CREATED

@generated @skip @team:DataDog/chat-integrations
Scenario: Create a target audience returns "Conflict" response
Given new "CreateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/chat-integrations
Scenario: Create a target audience returns "Not Found" response
Given new "CreateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Create organization handle returns "Bad Request" response
Given new "CreateOrganizationHandle" request
Expand Down Expand Up @@ -42,6 +74,36 @@ Feature: Google Chat Integration
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete a Google Chat organization binding returns "Bad Request" response
Given new "DeleteGoogleChatOrganization" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete a Google Chat organization binding returns "OK" response
Given new "DeleteGoogleChatOrganization" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete a target audience returns "Not Found" response
Given new "DeleteGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete a target audience returns "OK" response
Given new "DeleteGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete organization handle returns "Bad Request" response
Given new "DeleteOrganizationHandle" request
Expand All @@ -59,6 +121,56 @@ Feature: Google Chat Integration
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete the delegated user returns "Not Found" response
Given new "DeleteGoogleChatDelegatedUser" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Delete the delegated user returns "OK" response
Given new "DeleteGoogleChatDelegatedUser" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Get a Google Chat organization binding returns "Not Found" response
Given new "GetGoogleChatOrganization" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Get a Google Chat organization binding returns "OK" response
Given new "GetGoogleChatOrganization" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Get a target audience returns "Not Found" response
Given new "GetGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Get a target audience returns "OK" response
Given new "GetGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Get all Google Chat organization bindings returns "OK" response
Given new "ListGoogleChatOrganizations" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Get all organization handles returns "Bad Request" response
Given new "ListOrganizationHandles" request
Expand All @@ -82,6 +194,20 @@ Feature: Google Chat Integration
Then the response status is 200 OK
And the response "data[0].type" is equal to "google-chat-organization-handle"

@generated @skip @team:DataDog/chat-integrations
Scenario: Get all target audiences returns "Not Found" response
Given new "ListGoogleChatTargetAudiences" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Get all target audiences returns "OK" response
Given new "ListGoogleChatTargetAudiences" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Get organization handle returns "Bad Request" response
Given new "GetOrganizationHandle" request
Expand Down Expand Up @@ -136,6 +262,47 @@ Feature: Google Chat Integration
And the response "data.attributes.resource_name" is equal to "spaces/AAQA-zFIks8"
And the response "data.attributes.organization_binding_id" is equal to "e54cb570-c674-529c-769d-84b312288ed7"

@generated @skip @team:DataDog/chat-integrations
Scenario: Get the delegated user returns "Not Found" response
Given new "GetGoogleChatDelegatedUser" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Get the delegated user returns "OK" response
Given new "GetGoogleChatDelegatedUser" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Update a target audience returns "Bad Request" response
Given new "UpdateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/chat-integrations
Scenario: Update a target audience returns "Not Found" response
Given new "UpdateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/chat-integrations
Scenario: Update a target audience returns "OK" response
Given new "UpdateGoogleChatTargetAudience" request
And request contains "organization_binding_id" parameter from "REPLACE.ME"
And request contains "target_audience_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/chat-integrations
Scenario: Update organization handle returns "Bad Request" response
Given new "UpdateOrganizationHandle" request
Expand Down
Loading
Loading