From a016b3782233c615cbeecda5560be2f9df076ec6 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:18:51 +0000 Subject: [PATCH 1/2] Add OpenAPI specification for collab-general service (#2916) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 460 +++++++++++++++ .../CreateJiraIssueTemplate.rb | 25 + .../v2/jira-integration/DeleteJiraAccount.rb | 8 + .../DeleteJiraIssueTemplate.rb | 8 + .../jira-integration/GetJiraIssueTemplate.rb | 8 + .../v2/jira-integration/ListJiraAccounts.rb | 8 + .../ListJiraIssueTemplates.rb | 8 + .../UpdateJiraIssueTemplate.rb | 20 + features/scenarios_model_mapping.rb | 16 + features/v2/jira_integration.feature | 105 ++++ features/v2/undo.json | 49 ++ lib/datadog_api_client/configuration.rb | 7 + lib/datadog_api_client/inflector.rb | 20 + .../v2/api/jira_integration_api.rb | 522 ++++++++++++++++++ .../v2/models/jira_account_attributes.rb | 154 ++++++ .../v2/models/jira_account_data.rb | 165 ++++++ .../v2/models/jira_account_relationship.rb | 123 +++++ .../v2/models/jira_account_type.rb | 26 + .../v2/models/jira_accounts_meta.rb | 105 ++++ .../v2/models/jira_accounts_response.rb | 135 +++++ .../jira_issue_template_create_request.rb | 105 ++++ ...ssue_template_create_request_attributes.rb | 145 +++++ ..._create_request_attributes_jira_account.rb | 123 +++++ ...jira_issue_template_create_request_data.rb | 115 ++++ .../v2/models/jira_issue_template_data.rb | 175 ++++++ .../jira_issue_template_data_attributes.rb | 186 +++++++ .../jira_issue_template_data_relationships.rb | 123 +++++ .../v2/models/jira_issue_template_response.rb | 135 +++++ .../v2/models/jira_issue_template_type.rb | 26 + .../jira_issue_template_update_request.rb | 123 +++++ ...ssue_template_update_request_attributes.rb | 115 ++++ ...jira_issue_template_update_request_data.rb | 144 +++++ .../models/jira_issue_templates_response.rb | 137 +++++ 33 files changed, 3624 insertions(+) create mode 100644 examples/v2/jira-integration/CreateJiraIssueTemplate.rb create mode 100644 examples/v2/jira-integration/DeleteJiraAccount.rb create mode 100644 examples/v2/jira-integration/DeleteJiraIssueTemplate.rb create mode 100644 examples/v2/jira-integration/GetJiraIssueTemplate.rb create mode 100644 examples/v2/jira-integration/ListJiraAccounts.rb create mode 100644 examples/v2/jira-integration/ListJiraIssueTemplates.rb create mode 100644 examples/v2/jira-integration/UpdateJiraIssueTemplate.rb create mode 100644 features/v2/jira_integration.feature create mode 100644 lib/datadog_api_client/v2/api/jira_integration_api.rb create mode 100644 lib/datadog_api_client/v2/models/jira_account_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/jira_account_data.rb create mode 100644 lib/datadog_api_client/v2/models/jira_account_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/jira_account_type.rb create mode 100644 lib/datadog_api_client/v2/models/jira_accounts_meta.rb create mode 100644 lib/datadog_api_client/v2/models/jira_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes_jira_account.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_create_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_data.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_response.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_type.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_update_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_template_update_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/jira_issue_templates_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 128bce58baaa..66c2a10ceb07 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -29738,6 +29738,81 @@ components: required: - errors type: object + JiraAccountAttributes: + description: Attributes of a Jira account + properties: + consumer_key: + description: The consumer key for the Jira account + example: consumer-key-1 + type: string + instance_url: + description: The URL of the Jira instance + example: https://example.atlassian.net + type: string + last_webhook_timestamp: + description: Timestamp of the last webhook received + example: '2024-01-15T10:30:00Z' + format: date-time + type: string + required: + - consumer_key + - instance_url + type: object + JiraAccountData: + description: Data object for a Jira account + properties: + attributes: + $ref: '#/components/schemas/JiraAccountAttributes' + id: + description: Unique identifier for the Jira account + example: account-1 + type: string + type: + $ref: '#/components/schemas/JiraAccountType' + required: + - id + - type + - attributes + type: object + JiraAccountRelationship: + description: Relationship to a Jira account + properties: + data: + $ref: '#/components/schemas/JiraAccountData' + required: + - data + type: object + JiraAccountType: + description: Type identifier for Jira account resources + enum: + - jira-account + example: jira-account + type: string + x-enum-varnames: + - JIRA_ACCOUNT + JiraAccountsData: + description: Array of Jira account data objects + items: + $ref: '#/components/schemas/JiraAccountData' + type: array + JiraAccountsMeta: + description: Metadata for Jira accounts response + properties: + public_key: + description: Public key for the Jira integration + example: c29tZSBkYXRhIHdpdGggACBhbmQg77u/ + type: string + type: object + JiraAccountsResponse: + description: Response containing Jira accounts + properties: + data: + $ref: '#/components/schemas/JiraAccountsData' + meta: + $ref: '#/components/schemas/JiraAccountsMeta' + required: + - data + type: object JiraIntegrationMetadata: description: Incident integration metadata for the Jira integration. properties: @@ -29803,6 +29878,181 @@ components: description: Jira project key type: string type: object + JiraIssueTemplateCreateRequest: + description: Request to create a Jira issue template + properties: + data: + $ref: '#/components/schemas/JiraIssueTemplateCreateRequestData' + type: object + JiraIssueTemplateCreateRequestAttributes: + description: Attributes for creating a Jira issue template + properties: + fields: + additionalProperties: {} + description: Custom fields for the Jira issue template + example: + description: + payload: Test + type: json + type: object + issue_type_id: + description: The ID of the Jira issue type + example: '12730' + type: string + jira-account: + $ref: '#/components/schemas/JiraIssueTemplateCreateRequestAttributesJiraAccount' + name: + description: The name of the issue template + example: test-template + type: string + project_id: + description: The ID of the Jira project + example: '10772' + type: string + type: object + JiraIssueTemplateCreateRequestAttributesJiraAccount: + description: Reference to the Jira account + properties: + id: + description: The ID of the Jira account + example: 80f16d40-1fba-486e-b1fc-983e6ca19bec + format: uuid + type: string + required: + - id + type: object + JiraIssueTemplateCreateRequestData: + description: Data object for creating a Jira issue template + properties: + attributes: + $ref: '#/components/schemas/JiraIssueTemplateCreateRequestAttributes' + type: + $ref: '#/components/schemas/JiraIssueTemplateType' + type: object + JiraIssueTemplateData: + description: Data object for a Jira issue template + properties: + attributes: + $ref: '#/components/schemas/JiraIssueTemplateDataAttributes' + id: + description: Unique identifier for the Jira issue template + example: 65b3341b-0680-47f9-a6d4-134db45c603e + format: uuid + type: string + relationships: + $ref: '#/components/schemas/JiraIssueTemplateDataRelationships' + type: + $ref: '#/components/schemas/JiraIssueTemplateType' + required: + - id + - type + - attributes + type: object + JiraIssueTemplateDataAttributes: + description: Attributes of a Jira issue template + properties: + fields: + additionalProperties: {} + description: Custom fields for the Jira issue template + example: + description: + payload: Test Description + type: json + type: object + issue_type_id: + description: The ID of the Jira issue type + example: '456' + type: string + name: + description: The name of the issue template + example: Test Template + type: string + project_id: + description: The ID of the Jira project + example: '123' + type: string + required: + - name + - project_id + - issue_type_id + - fields + type: object + JiraIssueTemplateDataRelationships: + description: Relationships of a Jira issue template + properties: + jira-account: + $ref: '#/components/schemas/JiraAccountRelationship' + required: + - jira-account + type: object + JiraIssueTemplateResponse: + description: Response containing a single Jira issue template + properties: + data: + $ref: '#/components/schemas/JiraIssueTemplateData' + included: + $ref: '#/components/schemas/JiraAccountsData' + required: + - data + type: object + JiraIssueTemplateType: + description: Type identifier for Jira issue template resources + enum: + - jira-issue-template + example: jira-issue-template + type: string + x-enum-varnames: + - JIRA_ISSUE_TEMPLATE + JiraIssueTemplateUpdateRequest: + description: Request to update a Jira issue template + properties: + data: + $ref: '#/components/schemas/JiraIssueTemplateUpdateRequestData' + required: + - data + type: object + JiraIssueTemplateUpdateRequestAttributes: + description: Attributes for updating a Jira issue template + properties: + fields: + additionalProperties: {} + description: Custom fields for the Jira issue template + example: + description: + payload: Updated Description + type: json + type: object + name: + description: The name of the issue template + example: test_template_updated + type: string + type: object + JiraIssueTemplateUpdateRequestData: + description: Data object for updating a Jira issue template + properties: + attributes: + $ref: '#/components/schemas/JiraIssueTemplateUpdateRequestAttributes' + type: + $ref: '#/components/schemas/JiraIssueTemplateType' + required: + - type + - attributes + type: object + JiraIssueTemplatesData: + description: Array of Jira issue template data objects + items: + $ref: '#/components/schemas/JiraIssueTemplateData' + type: array + JiraIssueTemplatesResponse: + description: Response containing Jira issue templates + properties: + data: + $ref: '#/components/schemas/JiraIssueTemplatesData' + included: + $ref: '#/components/schemas/JiraAccountsData' + required: + - data + type: object JiraIssuesDataType: default: jira_issues description: Jira issues resource type. @@ -72978,6 +73228,213 @@ paths: operator: OR permissions: - gcp_configuration_edit + /api/v2/integration/jira/accounts: + get: + description: Get all Jira accounts for the organization. + operationId: ListJiraAccounts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JiraAccountsResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Jira accounts + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/integration/jira/accounts/{account_id}: + delete: + description: Delete a Jira account by ID. + operationId: DeleteJiraAccount + parameters: + - description: The ID of the Jira account to delete + example: 65b3341b-0680-47f9-a6d4-134db45c603e + in: path + name: account_id + required: true + schema: + format: uuid + type: string + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Jira account + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/integration/jira/issue-templates: + get: + description: Get all Jira issue templates for the organization. + operationId: ListJiraIssueTemplates + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplatesResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Jira issue templates + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create a new Jira issue template. + operationId: CreateJiraIssueTemplate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplateCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplateResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create Jira issue template + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/integration/jira/issue-templates/{issue_template_id}: + delete: + description: Delete a Jira issue template by ID. + operationId: DeleteJiraIssueTemplate + parameters: + - description: The ID of the Jira issue template to delete + example: 65b3341b-0680-47f9-a6d4-134db45c603e + in: path + name: issue_template_id + required: true + schema: + format: uuid + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Jira issue template + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get a Jira issue template by ID. + operationId: GetJiraIssueTemplate + parameters: + - description: The ID of the Jira issue template to retrieve + example: 65b3341b-0680-47f9-a6d4-134db45c603e + in: path + name: issue_template_id + required: true + schema: + format: uuid + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Jira issue template + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Update a Jira issue template by ID. + operationId: UpdateJiraIssueTemplate + parameters: + - description: The ID of the Jira issue template to update + example: 65b3341b-0680-47f9-a6d4-134db45c603e + in: path + name: issue_template_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplateUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JiraIssueTemplateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Jira issue template + tags: + - Jira Integration + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}: get: description: Get the tenant, team, and channel ID of a channel in the Datadog @@ -92646,6 +93103,9 @@ tags: and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incidents +- description: Manage your Jira Integration. Atlassian Jira is a project management + and issue tracking tool for teams to coordinate work and handle tasks efficiently. + name: Jira Integration - description: 'Manage your Datadog API and application keys. You need an API key and an diff --git a/examples/v2/jira-integration/CreateJiraIssueTemplate.rb b/examples/v2/jira-integration/CreateJiraIssueTemplate.rb new file mode 100644 index 000000000000..f9d7e38eac39 --- /dev/null +++ b/examples/v2/jira-integration/CreateJiraIssueTemplate.rb @@ -0,0 +1,25 @@ +# Create Jira issue template returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_jira_issue_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new + +body = DatadogAPIClient::V2::JiraIssueTemplateCreateRequest.new({ + data: DatadogAPIClient::V2::JiraIssueTemplateCreateRequestData.new({ + attributes: DatadogAPIClient::V2::JiraIssueTemplateCreateRequestAttributes.new({ + fields: { + "description": "{'payload': 'Test', 'type': 'json'}", + }, + issue_type_id: "12730", + jira_account: DatadogAPIClient::V2::JiraIssueTemplateCreateRequestAttributesJiraAccount.new({ + id: "80f16d40-1fba-486e-b1fc-983e6ca19bec", + }), + name: "test-template", + project_id: "10772", + }), + type: DatadogAPIClient::V2::JiraIssueTemplateType::JIRA_ISSUE_TEMPLATE, + }), +}) +p api_instance.create_jira_issue_template(body) diff --git a/examples/v2/jira-integration/DeleteJiraAccount.rb b/examples/v2/jira-integration/DeleteJiraAccount.rb new file mode 100644 index 000000000000..9a8784832849 --- /dev/null +++ b/examples/v2/jira-integration/DeleteJiraAccount.rb @@ -0,0 +1,8 @@ +# Delete Jira account returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_jira_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new +api_instance.delete_jira_account("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/jira-integration/DeleteJiraIssueTemplate.rb b/examples/v2/jira-integration/DeleteJiraIssueTemplate.rb new file mode 100644 index 000000000000..055bbaf97692 --- /dev/null +++ b/examples/v2/jira-integration/DeleteJiraIssueTemplate.rb @@ -0,0 +1,8 @@ +# Delete Jira issue template returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_jira_issue_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new +api_instance.delete_jira_issue_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/jira-integration/GetJiraIssueTemplate.rb b/examples/v2/jira-integration/GetJiraIssueTemplate.rb new file mode 100644 index 000000000000..671dfc60de1e --- /dev/null +++ b/examples/v2/jira-integration/GetJiraIssueTemplate.rb @@ -0,0 +1,8 @@ +# Get Jira issue template returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_jira_issue_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new +p api_instance.get_jira_issue_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/jira-integration/ListJiraAccounts.rb b/examples/v2/jira-integration/ListJiraAccounts.rb new file mode 100644 index 000000000000..5e0fea026ea9 --- /dev/null +++ b/examples/v2/jira-integration/ListJiraAccounts.rb @@ -0,0 +1,8 @@ +# List Jira accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_jira_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new +p api_instance.list_jira_accounts() diff --git a/examples/v2/jira-integration/ListJiraIssueTemplates.rb b/examples/v2/jira-integration/ListJiraIssueTemplates.rb new file mode 100644 index 000000000000..afa99857f146 --- /dev/null +++ b/examples/v2/jira-integration/ListJiraIssueTemplates.rb @@ -0,0 +1,8 @@ +# List Jira issue templates returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_jira_issue_templates".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new +p api_instance.list_jira_issue_templates() diff --git a/examples/v2/jira-integration/UpdateJiraIssueTemplate.rb b/examples/v2/jira-integration/UpdateJiraIssueTemplate.rb new file mode 100644 index 000000000000..41bf3f7fc6b4 --- /dev/null +++ b/examples/v2/jira-integration/UpdateJiraIssueTemplate.rb @@ -0,0 +1,20 @@ +# Update Jira issue template returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_jira_issue_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::JiraIntegrationAPI.new + +body = DatadogAPIClient::V2::JiraIssueTemplateUpdateRequest.new({ + data: DatadogAPIClient::V2::JiraIssueTemplateUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::JiraIssueTemplateUpdateRequestAttributes.new({ + fields: { + "description": "{'payload': 'Updated Description', 'type': 'json'}", + }, + name: "test_template_updated", + }), + type: DatadogAPIClient::V2::JiraIssueTemplateType::JIRA_ISSUE_TEMPLATE, + }), +}) +p api_instance.update_jira_issue_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index bb421b0260f2..8718f9542833 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2245,6 +2245,22 @@ "v2.MakeGCPSTSDelegate" => { "body" => "Object", }, + "v2.DeleteJiraAccount" => { + "account_id" => "UUID", + }, + "v2.CreateJiraIssueTemplate" => { + "body" => "JiraIssueTemplateCreateRequest", + }, + "v2.DeleteJiraIssueTemplate" => { + "issue_template_id" => "UUID", + }, + "v2.GetJiraIssueTemplate" => { + "issue_template_id" => "UUID", + }, + "v2.UpdateJiraIssueTemplate" => { + "issue_template_id" => "UUID", + "body" => "JiraIssueTemplateUpdateRequest", + }, "v2.GetChannelByName" => { "tenant_name" => "String", "team_name" => "String", diff --git a/features/v2/jira_integration.feature b/features/v2/jira_integration.feature new file mode 100644 index 000000000000..528a78b7b3b2 --- /dev/null +++ b/features/v2/jira_integration.feature @@ -0,0 +1,105 @@ +@endpoint(jira-integration) @endpoint(jira-integration-v2) +Feature: Jira Integration + Manage your Jira Integration. Atlassian Jira is a project management and + issue tracking tool for teams to coordinate work and handle tasks + efficiently. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "JiraIntegration" API + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Create Jira issue template returns "Bad Request" response + Given operation "CreateJiraIssueTemplate" enabled + And new "CreateJiraIssueTemplate" request + And body with value {"data": {"attributes": {"fields": {"description": {"payload": "Test", "type": "json"}}, "issue_type_id": "12730", "jira-account": {"id": "80f16d40-1fba-486e-b1fc-983e6ca19bec"}, "name": "test-template", "project_id": "10772"}, "type": "jira-issue-template"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Create Jira issue template returns "Created" response + Given operation "CreateJiraIssueTemplate" enabled + And new "CreateJiraIssueTemplate" request + And body with value {"data": {"attributes": {"fields": {"description": {"payload": "Test", "type": "json"}}, "issue_type_id": "12730", "jira-account": {"id": "80f16d40-1fba-486e-b1fc-983e6ca19bec"}, "name": "test-template", "project_id": "10772"}, "type": "jira-issue-template"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete Jira account returns "Bad Request" response + Given operation "DeleteJiraAccount" enabled + And new "DeleteJiraAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete Jira account returns "No Content" response + Given operation "DeleteJiraAccount" enabled + And new "DeleteJiraAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete Jira issue template returns "No Content" response + Given operation "DeleteJiraIssueTemplate" enabled + And new "DeleteJiraIssueTemplate" request + And request contains "issue_template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Get Jira issue template returns "Bad Request" response + Given operation "GetJiraIssueTemplate" enabled + And new "GetJiraIssueTemplate" request + And request contains "issue_template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Get Jira issue template returns "OK" response + Given operation "GetJiraIssueTemplate" enabled + And new "GetJiraIssueTemplate" request + And request contains "issue_template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: List Jira accounts returns "Not Found" response + Given operation "ListJiraAccounts" enabled + And new "ListJiraAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: List Jira accounts returns "OK" response + Given operation "ListJiraAccounts" enabled + And new "ListJiraAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: List Jira issue templates returns "OK" response + Given operation "ListJiraIssueTemplates" enabled + And new "ListJiraIssueTemplates" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update Jira issue template returns "Bad Request" response + Given operation "UpdateJiraIssueTemplate" enabled + And new "UpdateJiraIssueTemplate" request + And request contains "issue_template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"fields": {"description": {"payload": "Updated Description", "type": "json"}}, "name": "test_template_updated"}, "type": "jira-issue-template"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update Jira issue template returns "OK" response + Given operation "UpdateJiraIssueTemplate" enabled + And new "UpdateJiraIssueTemplate" request + And request contains "issue_template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"fields": {"description": {"payload": "Updated Description", "type": "json"}}, "name": "test_template_updated"}, "type": "jira-issue-template"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 59046d30f0b6..1cd2195bba17 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2001,6 +2001,55 @@ "type": "idempotent" } }, + "ListJiraAccounts": { + "tag": "Jira Integration", + "undo": { + "type": "safe" + } + }, + "DeleteJiraAccount": { + "tag": "Jira Integration", + "undo": { + "type": "idempotent" + } + }, + "ListJiraIssueTemplates": { + "tag": "Jira Integration", + "undo": { + "type": "safe" + } + }, + "CreateJiraIssueTemplate": { + "tag": "Jira Integration", + "undo": { + "operationId": "DeleteJiraIssueTemplate", + "parameters": [ + { + "name": "issue_template_id", + "source": "" + } + ], + "type": "unsafe" + } + }, + "DeleteJiraIssueTemplate": { + "tag": "Jira Integration", + "undo": { + "type": "idempotent" + } + }, + "GetJiraIssueTemplate": { + "tag": "Jira Integration", + "undo": { + "type": "safe" + } + }, + "UpdateJiraIssueTemplate": { + "tag": "Jira Integration", + "undo": { + "type": "idempotent" + } + }, "GetChannelByName": { "tag": "Microsoft Teams Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index a050d85bf5a8..e715f704f7fa 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -284,6 +284,13 @@ def initialize "v2.update_incident_notification_template": false, "v2.update_incident_todo": false, "v2.update_incident_type": false, + "v2.create_jira_issue_template": false, + "v2.delete_jira_account": false, + "v2.delete_jira_issue_template": false, + "v2.get_jira_issue_template": false, + "v2.list_jira_accounts": false, + "v2.list_jira_issue_templates": false, + "v2.update_jira_issue_template": false, "v2.add_role_to_restriction_query": false, "v2.create_restriction_query": false, "v2.delete_restriction_query": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index eab18ec23f59..2d73f33509d5 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2775,11 +2775,30 @@ def overrides "v2.item_api_payload_meta_page" => "ItemApiPayloadMetaPage", "v2.item_api_payload_meta_schema" => "ItemApiPayloadMetaSchema", "v2.item_api_payload_meta_schema_field" => "ItemApiPayloadMetaSchemaField", + "v2.jira_account_attributes" => "JiraAccountAttributes", + "v2.jira_account_data" => "JiraAccountData", + "v2.jira_account_relationship" => "JiraAccountRelationship", + "v2.jira_accounts_meta" => "JiraAccountsMeta", + "v2.jira_accounts_response" => "JiraAccountsResponse", + "v2.jira_account_type" => "JiraAccountType", "v2.jira_integration_metadata" => "JiraIntegrationMetadata", "v2.jira_integration_metadata_issues_item" => "JiraIntegrationMetadataIssuesItem", "v2.jira_issue" => "JiraIssue", "v2.jira_issue_result" => "JiraIssueResult", "v2.jira_issues_data_type" => "JiraIssuesDataType", + "v2.jira_issue_template_create_request" => "JiraIssueTemplateCreateRequest", + "v2.jira_issue_template_create_request_attributes" => "JiraIssueTemplateCreateRequestAttributes", + "v2.jira_issue_template_create_request_attributes_jira_account" => "JiraIssueTemplateCreateRequestAttributesJiraAccount", + "v2.jira_issue_template_create_request_data" => "JiraIssueTemplateCreateRequestData", + "v2.jira_issue_template_data" => "JiraIssueTemplateData", + "v2.jira_issue_template_data_attributes" => "JiraIssueTemplateDataAttributes", + "v2.jira_issue_template_data_relationships" => "JiraIssueTemplateDataRelationships", + "v2.jira_issue_template_response" => "JiraIssueTemplateResponse", + "v2.jira_issue_templates_response" => "JiraIssueTemplatesResponse", + "v2.jira_issue_template_type" => "JiraIssueTemplateType", + "v2.jira_issue_template_update_request" => "JiraIssueTemplateUpdateRequest", + "v2.jira_issue_template_update_request_attributes" => "JiraIssueTemplateUpdateRequestAttributes", + "v2.jira_issue_template_update_request_data" => "JiraIssueTemplateUpdateRequestData", "v2.job_create_response" => "JobCreateResponse", "v2.job_create_response_data" => "JobCreateResponseData", "v2.job_definition" => "JobDefinition", @@ -4871,6 +4890,7 @@ def overrides "v2.incident_teams_api" => "IncidentTeamsAPI", "v2.incidents_api" => "IncidentsAPI", "v2.ip_allowlist_api" => "IPAllowlistAPI", + "v2.jira_integration_api" => "JiraIntegrationAPI", "v2.key_management_api" => "KeyManagementAPI", "v2.logs_api" => "LogsAPI", "v2.logs_archives_api" => "LogsArchivesAPI", diff --git a/lib/datadog_api_client/v2/api/jira_integration_api.rb b/lib/datadog_api_client/v2/api/jira_integration_api.rb new file mode 100644 index 000000000000..669904fa4afa --- /dev/null +++ b/lib/datadog_api_client/v2/api/jira_integration_api.rb @@ -0,0 +1,522 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class JiraIntegrationAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create Jira issue template. + # + # @see #create_jira_issue_template_with_http_info + def create_jira_issue_template(body, opts = {}) + data, _status_code, _headers = create_jira_issue_template_with_http_info(body, opts) + data + end + + # Create Jira issue template. + # + # Create a new Jira issue template. + # + # @param body [JiraIssueTemplateCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(JiraIssueTemplateResponse, Integer, Hash)>] JiraIssueTemplateResponse data, response status code and response headers + def create_jira_issue_template_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_jira_issue_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_jira_issue_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_jira_issue_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.create_jira_issue_template ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling JiraIntegrationAPI.create_jira_issue_template" + end + # resource path + local_var_path = '/api/v2/integration/jira/issue-templates' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'JiraIssueTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_jira_issue_template, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#create_jira_issue_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Jira account. + # + # @see #delete_jira_account_with_http_info + def delete_jira_account(account_id, opts = {}) + delete_jira_account_with_http_info(account_id, opts) + nil + end + + # Delete Jira account. + # + # Delete a Jira account by ID. + # + # @param account_id [UUID] The ID of the Jira account to delete + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_jira_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_jira_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_jira_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_jira_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.delete_jira_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling JiraIntegrationAPI.delete_jira_account" + end + # resource path + local_var_path = '/api/v2/integration/jira/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_jira_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#delete_jira_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Jira issue template. + # + # @see #delete_jira_issue_template_with_http_info + def delete_jira_issue_template(issue_template_id, opts = {}) + delete_jira_issue_template_with_http_info(issue_template_id, opts) + nil + end + + # Delete Jira issue template. + # + # Delete a Jira issue template by ID. + # + # @param issue_template_id [UUID] The ID of the Jira issue template to delete + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_jira_issue_template_with_http_info(issue_template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_jira_issue_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_jira_issue_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_jira_issue_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.delete_jira_issue_template ...' + end + # verify the required parameter 'issue_template_id' is set + if @api_client.config.client_side_validation && issue_template_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_template_id' when calling JiraIntegrationAPI.delete_jira_issue_template" + end + # resource path + local_var_path = '/api/v2/integration/jira/issue-templates/{issue_template_id}'.sub('{issue_template_id}', CGI.escape(issue_template_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_jira_issue_template, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#delete_jira_issue_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Jira issue template. + # + # @see #get_jira_issue_template_with_http_info + def get_jira_issue_template(issue_template_id, opts = {}) + data, _status_code, _headers = get_jira_issue_template_with_http_info(issue_template_id, opts) + data + end + + # Get Jira issue template. + # + # Get a Jira issue template by ID. + # + # @param issue_template_id [UUID] The ID of the Jira issue template to retrieve + # @param opts [Hash] the optional parameters + # @return [Array<(JiraIssueTemplateResponse, Integer, Hash)>] JiraIssueTemplateResponse data, response status code and response headers + def get_jira_issue_template_with_http_info(issue_template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_jira_issue_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_jira_issue_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_jira_issue_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.get_jira_issue_template ...' + end + # verify the required parameter 'issue_template_id' is set + if @api_client.config.client_side_validation && issue_template_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_template_id' when calling JiraIntegrationAPI.get_jira_issue_template" + end + # resource path + local_var_path = '/api/v2/integration/jira/issue-templates/{issue_template_id}'.sub('{issue_template_id}', CGI.escape(issue_template_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JiraIssueTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_jira_issue_template, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#get_jira_issue_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Jira accounts. + # + # @see #list_jira_accounts_with_http_info + def list_jira_accounts(opts = {}) + data, _status_code, _headers = list_jira_accounts_with_http_info(opts) + data + end + + # List Jira accounts. + # + # Get all Jira accounts for the organization. + # + # @param opts [Hash] the optional parameters + # @return [Array<(JiraAccountsResponse, Integer, Hash)>] JiraAccountsResponse data, response status code and response headers + def list_jira_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_jira_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_jira_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_jira_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.list_jira_accounts ...' + end + # resource path + local_var_path = '/api/v2/integration/jira/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JiraAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_jira_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#list_jira_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Jira issue templates. + # + # @see #list_jira_issue_templates_with_http_info + def list_jira_issue_templates(opts = {}) + data, _status_code, _headers = list_jira_issue_templates_with_http_info(opts) + data + end + + # List Jira issue templates. + # + # Get all Jira issue templates for the organization. + # + # @param opts [Hash] the optional parameters + # @return [Array<(JiraIssueTemplatesResponse, Integer, Hash)>] JiraIssueTemplatesResponse data, response status code and response headers + def list_jira_issue_templates_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_jira_issue_templates".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_jira_issue_templates") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_jira_issue_templates")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.list_jira_issue_templates ...' + end + # resource path + local_var_path = '/api/v2/integration/jira/issue-templates' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JiraIssueTemplatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_jira_issue_templates, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#list_jira_issue_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Jira issue template. + # + # @see #update_jira_issue_template_with_http_info + def update_jira_issue_template(issue_template_id, body, opts = {}) + data, _status_code, _headers = update_jira_issue_template_with_http_info(issue_template_id, body, opts) + data + end + + # Update Jira issue template. + # + # Update a Jira issue template by ID. + # + # @param issue_template_id [UUID] The ID of the Jira issue template to update + # @param body [JiraIssueTemplateUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(JiraIssueTemplateResponse, Integer, Hash)>] JiraIssueTemplateResponse data, response status code and response headers + def update_jira_issue_template_with_http_info(issue_template_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_jira_issue_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_jira_issue_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_jira_issue_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JiraIntegrationAPI.update_jira_issue_template ...' + end + # verify the required parameter 'issue_template_id' is set + if @api_client.config.client_side_validation && issue_template_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_template_id' when calling JiraIntegrationAPI.update_jira_issue_template" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling JiraIntegrationAPI.update_jira_issue_template" + end + # resource path + local_var_path = '/api/v2/integration/jira/issue-templates/{issue_template_id}'.sub('{issue_template_id}', CGI.escape(issue_template_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'JiraIssueTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_jira_issue_template, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JiraIntegrationAPI#update_jira_issue_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_account_attributes.rb b/lib/datadog_api_client/v2/models/jira_account_attributes.rb new file mode 100644 index 000000000000..a77ccd7bdf21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_account_attributes.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Jira account + class JiraAccountAttributes + include BaseGenericModel + + # The consumer key for the Jira account + attr_reader :consumer_key + + # The URL of the Jira instance + attr_reader :instance_url + + # Timestamp of the last webhook received + attr_accessor :last_webhook_timestamp + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'consumer_key' => :'consumer_key', + :'instance_url' => :'instance_url', + :'last_webhook_timestamp' => :'last_webhook_timestamp' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'consumer_key' => :'String', + :'instance_url' => :'String', + :'last_webhook_timestamp' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraAccountAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'consumer_key') + self.consumer_key = attributes[:'consumer_key'] + end + + if attributes.key?(:'instance_url') + self.instance_url = attributes[:'instance_url'] + end + + if attributes.key?(:'last_webhook_timestamp') + self.last_webhook_timestamp = attributes[:'last_webhook_timestamp'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @consumer_key.nil? + return false if @instance_url.nil? + true + end + + # Custom attribute writer method with validation + # @param consumer_key [Object] Object to be assigned + # @!visibility private + def consumer_key=(consumer_key) + if consumer_key.nil? + fail ArgumentError, 'invalid value for "consumer_key", consumer_key cannot be nil.' + end + @consumer_key = consumer_key + end + + # Custom attribute writer method with validation + # @param instance_url [Object] Object to be assigned + # @!visibility private + def instance_url=(instance_url) + if instance_url.nil? + fail ArgumentError, 'invalid value for "instance_url", instance_url cannot be nil.' + end + @instance_url = instance_url + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + consumer_key == o.consumer_key && + instance_url == o.instance_url && + last_webhook_timestamp == o.last_webhook_timestamp && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [consumer_key, instance_url, last_webhook_timestamp, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_account_data.rb b/lib/datadog_api_client/v2/models/jira_account_data.rb new file mode 100644 index 000000000000..833217edf805 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_account_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a Jira account + class JiraAccountData + include BaseGenericModel + + # Attributes of a Jira account + attr_reader :attributes + + # Unique identifier for the Jira account + attr_reader :id + + # Type identifier for Jira account resources + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JiraAccountAttributes', + :'id' => :'String', + :'type' => :'JiraAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraAccountData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_account_relationship.rb b/lib/datadog_api_client/v2/models/jira_account_relationship.rb new file mode 100644 index 000000000000..d8761df5974f --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_account_relationship.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to a Jira account + class JiraAccountRelationship + include BaseGenericModel + + # Data object for a Jira account + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'JiraAccountData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraAccountRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_account_type.rb b/lib/datadog_api_client/v2/models/jira_account_type.rb new file mode 100644 index 000000000000..210a55f7431c --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_account_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type identifier for Jira account resources + class JiraAccountType + include BaseEnumModel + + JIRA_ACCOUNT = "jira-account".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/jira_accounts_meta.rb b/lib/datadog_api_client/v2/models/jira_accounts_meta.rb new file mode 100644 index 000000000000..2d6a5a589bda --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_accounts_meta.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata for Jira accounts response + class JiraAccountsMeta + include BaseGenericModel + + # Public key for the Jira integration + attr_accessor :public_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'public_key' => :'public_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'public_key' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraAccountsMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key == o.public_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [public_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_accounts_response.rb b/lib/datadog_api_client/v2/models/jira_accounts_response.rb new file mode 100644 index 000000000000..c3b8644a4656 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_accounts_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing Jira accounts + class JiraAccountsResponse + include BaseGenericModel + + # Array of Jira account data objects + attr_reader :data + + # Metadata for Jira accounts response + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'JiraAccountsMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_create_request.rb b/lib/datadog_api_client/v2/models/jira_issue_template_create_request.rb new file mode 100644 index 000000000000..a752444d0edd --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_create_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a Jira issue template + class JiraIssueTemplateCreateRequest + include BaseGenericModel + + # Data object for creating a Jira issue template + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'JiraIssueTemplateCreateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes.rb b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes.rb new file mode 100644 index 000000000000..9dfa74b5983a --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a Jira issue template + class JiraIssueTemplateCreateRequestAttributes + include BaseGenericModel + + # Custom fields for the Jira issue template + attr_accessor :fields + + # The ID of the Jira issue type + attr_accessor :issue_type_id + + # Reference to the Jira account + attr_accessor :jira_account + + # The name of the issue template + attr_accessor :name + + # The ID of the Jira project + attr_accessor :project_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'issue_type_id' => :'issue_type_id', + :'jira_account' => :'jira-account', + :'name' => :'name', + :'project_id' => :'project_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Hash', + :'issue_type_id' => :'String', + :'jira_account' => :'JiraIssueTemplateCreateRequestAttributesJiraAccount', + :'name' => :'String', + :'project_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateCreateRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields') + self.fields = attributes[:'fields'] + end + + if attributes.key?(:'issue_type_id') + self.issue_type_id = attributes[:'issue_type_id'] + end + + if attributes.key?(:'jira_account') + self.jira_account = attributes[:'jira_account'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fields == o.fields && + issue_type_id == o.issue_type_id && + jira_account == o.jira_account && + name == o.name && + project_id == o.project_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, issue_type_id, jira_account, name, project_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes_jira_account.rb b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes_jira_account.rb new file mode 100644 index 000000000000..33d78154ee6a --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_attributes_jira_account.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the Jira account + class JiraIssueTemplateCreateRequestAttributesJiraAccount + include BaseGenericModel + + # The ID of the Jira account + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateCreateRequestAttributesJiraAccount` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_create_request_data.rb b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_data.rb new file mode 100644 index 000000000000..86514b095b8c --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_create_request_data.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for creating a Jira issue template + class JiraIssueTemplateCreateRequestData + include BaseGenericModel + + # Attributes for creating a Jira issue template + attr_accessor :attributes + + # Type identifier for Jira issue template resources + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JiraIssueTemplateCreateRequestAttributes', + :'type' => :'JiraIssueTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateCreateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_data.rb b/lib/datadog_api_client/v2/models/jira_issue_template_data.rb new file mode 100644 index 000000000000..76ac8bea2b2e --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_data.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a Jira issue template + class JiraIssueTemplateData + include BaseGenericModel + + # Attributes of a Jira issue template + attr_reader :attributes + + # Unique identifier for the Jira issue template + attr_reader :id + + # Relationships of a Jira issue template + attr_accessor :relationships + + # Type identifier for Jira issue template resources + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JiraIssueTemplateDataAttributes', + :'id' => :'UUID', + :'relationships' => :'JiraIssueTemplateDataRelationships', + :'type' => :'JiraIssueTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_data_attributes.rb b/lib/datadog_api_client/v2/models/jira_issue_template_data_attributes.rb new file mode 100644 index 000000000000..8b87ef0817f5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_data_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Jira issue template + class JiraIssueTemplateDataAttributes + include BaseGenericModel + + # Custom fields for the Jira issue template + attr_reader :fields + + # The ID of the Jira issue type + attr_reader :issue_type_id + + # The name of the issue template + attr_reader :name + + # The ID of the Jira project + attr_reader :project_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'issue_type_id' => :'issue_type_id', + :'name' => :'name', + :'project_id' => :'project_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Hash', + :'issue_type_id' => :'String', + :'name' => :'String', + :'project_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields') + self.fields = attributes[:'fields'] + end + + if attributes.key?(:'issue_type_id') + self.issue_type_id = attributes[:'issue_type_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @fields.nil? + return false if @issue_type_id.nil? + return false if @name.nil? + return false if @project_id.nil? + true + end + + # Custom attribute writer method with validation + # @param fields [Object] Object to be assigned + # @!visibility private + def fields=(fields) + if fields.nil? + fail ArgumentError, 'invalid value for "fields", fields cannot be nil.' + end + @fields = fields + end + + # Custom attribute writer method with validation + # @param issue_type_id [Object] Object to be assigned + # @!visibility private + def issue_type_id=(issue_type_id) + if issue_type_id.nil? + fail ArgumentError, 'invalid value for "issue_type_id", issue_type_id cannot be nil.' + end + @issue_type_id = issue_type_id + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param project_id [Object] Object to be assigned + # @!visibility private + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'invalid value for "project_id", project_id cannot be nil.' + end + @project_id = project_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fields == o.fields && + issue_type_id == o.issue_type_id && + name == o.name && + project_id == o.project_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, issue_type_id, name, project_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_data_relationships.rb b/lib/datadog_api_client/v2/models/jira_issue_template_data_relationships.rb new file mode 100644 index 000000000000..b6c68502d240 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_data_relationships.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationships of a Jira issue template + class JiraIssueTemplateDataRelationships + include BaseGenericModel + + # Relationship to a Jira account + attr_reader :jira_account + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'jira_account' => :'jira-account' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'jira_account' => :'JiraAccountRelationship' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'jira_account') + self.jira_account = attributes[:'jira_account'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @jira_account.nil? + true + end + + # Custom attribute writer method with validation + # @param jira_account [Object] Object to be assigned + # @!visibility private + def jira_account=(jira_account) + if jira_account.nil? + fail ArgumentError, 'invalid value for "jira_account", jira_account cannot be nil.' + end + @jira_account = jira_account + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + jira_account == o.jira_account && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [jira_account, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_response.rb b/lib/datadog_api_client/v2/models/jira_issue_template_response.rb new file mode 100644 index 000000000000..bad151e5c55f --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a single Jira issue template + class JiraIssueTemplateResponse + include BaseGenericModel + + # Data object for a Jira issue template + attr_reader :data + + # Array of Jira account data objects + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'JiraIssueTemplateData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_type.rb b/lib/datadog_api_client/v2/models/jira_issue_template_type.rb new file mode 100644 index 000000000000..a1f1aa3eb502 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type identifier for Jira issue template resources + class JiraIssueTemplateType + include BaseEnumModel + + JIRA_ISSUE_TEMPLATE = "jira-issue-template".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_update_request.rb b/lib/datadog_api_client/v2/models/jira_issue_template_update_request.rb new file mode 100644 index 000000000000..e0a811feace4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to update a Jira issue template + class JiraIssueTemplateUpdateRequest + include BaseGenericModel + + # Data object for updating a Jira issue template + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'JiraIssueTemplateUpdateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_update_request_attributes.rb b/lib/datadog_api_client/v2/models/jira_issue_template_update_request_attributes.rb new file mode 100644 index 000000000000..2bcd0e003260 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_update_request_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating a Jira issue template + class JiraIssueTemplateUpdateRequestAttributes + include BaseGenericModel + + # Custom fields for the Jira issue template + attr_accessor :fields + + # The name of the issue template + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Hash', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateUpdateRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields') + self.fields = attributes[:'fields'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fields == o.fields && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_template_update_request_data.rb b/lib/datadog_api_client/v2/models/jira_issue_template_update_request_data.rb new file mode 100644 index 000000000000..7ee9a4351f20 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_template_update_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for updating a Jira issue template + class JiraIssueTemplateUpdateRequestData + include BaseGenericModel + + # Attributes for updating a Jira issue template + attr_reader :attributes + + # Type identifier for Jira issue template resources + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JiraIssueTemplateUpdateRequestAttributes', + :'type' => :'JiraIssueTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplateUpdateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jira_issue_templates_response.rb b/lib/datadog_api_client/v2/models/jira_issue_templates_response.rb new file mode 100644 index 000000000000..58ee5152085d --- /dev/null +++ b/lib/datadog_api_client/v2/models/jira_issue_templates_response.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing Jira issue templates + class JiraIssueTemplatesResponse + include BaseGenericModel + + # Array of Jira issue template data objects + attr_reader :data + + # Array of Jira account data objects + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueTemplatesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end From f5fdf94d3308bfe3b2207588465502f718a0ca1e Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 12:38:00 +0000 Subject: [PATCH 2/2] Add Synthetics suites CRUD endpoints (#2878) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 534 +++++++++++++++--- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 20 +- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 23 +- ...version-history-returns-OK-response.frozen | 2 +- ...-s-version-history-returns-OK-response.yml | 23 +- ...returns-OK-response-with-pagination.frozen | 1 - ...es-returns-OK-response-with-pagination.yml | 101 ---- ...rns-OK-response-with-sort-ascending.frozen | 1 - ...eturns-OK-response-with-sort-ascending.yml | 102 ---- ...ns-OK-response-with-sort-descending.frozen | 1 - ...turns-OK-response-with-sort-descending.yml | 102 ---- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 25 +- ...nthetics-suites-returns-OK-response.frozen | 1 + ...-Synthetics-suites-returns-OK-response.yml | 81 +++ ...te-a-test-suite-returns-OK-response.frozen | 1 + ...reate-a-test-suite-returns-OK-response.yml | 55 ++ ...curityMonitoringSuppressions_1315707136.rb | 15 - ...curityMonitoringSuppressions_1741429096.rb | 15 - ...curityMonitoringSuppressions_3985905558.rb | 16 - .../v2/synthetics/CreateSyntheticsSuite.rb | 21 + .../v2/synthetics/DeleteSyntheticsSuites.rb | 16 + examples/v2/synthetics/EditSyntheticsSuite.rb | 26 + examples/v2/synthetics/GetSyntheticsSuite.rb | 5 + examples/v2/synthetics/SearchSuites.rb | 5 + features/scenarios_model_mapping.rb | 23 +- features/v2/given.json | 14 +- features/v2/security_monitoring.feature | 34 -- features/v2/synthetics.feature | 70 +++ features/v2/undo.json | 37 ++ lib/datadog_api_client/inflector.rb | 25 +- .../v2/api/security_monitoring_api.rb | 14 +- .../v2/api/synthetics_api.rb | 329 +++++++++++ ...meta.rb => deleted_suite_response_data.rb} | 50 +- .../deleted_suite_response_data_attributes.rb | 115 ++++ .../models/deleted_suites_request_delete.rb | 143 +++++ ...eleted_suites_request_delete_attributes.rb | 135 +++++ .../deleted_suites_request_delete_request.rb | 123 ++++ ...sort.rb => deleted_suites_request_type.rb} | 15 +- ...ons_meta.rb => deleted_suites_response.rb} | 24 +- .../v2/models/suite_create_edit.rb | 144 +++++ .../v2/models/suite_create_edit_request.rb | 123 ++++ .../v2/models/suite_search_response_type.rb | 26 + .../v2/models/synthetics_suite.rb | 230 ++++++++ .../v2/models/synthetics_suite_options.rb | 127 +++++ ...sponse.rb => synthetics_suite_response.rb} | 28 +- .../models/synthetics_suite_response_data.rb | 125 ++++ .../synthetics_suite_search_response.rb | 105 ++++ .../synthetics_suite_search_response_data.rb | 125 ++++ ...s_suite_search_response_data_attributes.rb | 135 +++++ .../v2/models/synthetics_suite_test.rb | 133 +++++ ...thetics_suite_test_alerting_criticality.rb | 27 + .../v2/models/synthetics_suite_type.rb | 26 + .../v2/models/synthetics_suite_types.rb | 26 + 56 files changed, 3104 insertions(+), 625 deletions(-) delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml create mode 100644 cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.frozen create mode 100644 cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.yml create mode 100644 cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.frozen create mode 100644 cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.yml delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb create mode 100644 examples/v2/synthetics/CreateSyntheticsSuite.rb create mode 100644 examples/v2/synthetics/DeleteSyntheticsSuites.rb create mode 100644 examples/v2/synthetics/EditSyntheticsSuite.rb create mode 100644 examples/v2/synthetics/GetSyntheticsSuite.rb create mode 100644 examples/v2/synthetics/SearchSuites.rb rename lib/datadog_api_client/v2/models/{security_monitoring_suppressions_page_meta.rb => deleted_suite_response_data.rb} (71%) create mode 100644 lib/datadog_api_client/v2/models/deleted_suite_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/deleted_suites_request_delete.rb create mode 100644 lib/datadog_api_client/v2/models/deleted_suites_request_delete_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/deleted_suites_request_delete_request.rb rename lib/datadog_api_client/v2/models/{security_monitoring_suppression_sort.rb => deleted_suites_request_type.rb} (52%) rename lib/datadog_api_client/v2/models/{security_monitoring_suppressions_meta.rb => deleted_suites_response.rb} (84%) create mode 100644 lib/datadog_api_client/v2/models/suite_create_edit.rb create mode 100644 lib/datadog_api_client/v2/models/suite_create_edit_request.rb create mode 100644 lib/datadog_api_client/v2/models/suite_search_response_type.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_options.rb rename lib/datadog_api_client/v2/models/{security_monitoring_paginated_suppressions_response.rb => synthetics_suite_response.rb} (77%) create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_search_response.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_search_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_search_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_test.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_test_alerting_criticality.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_type.rb create mode 100644 lib/datadog_api_client/v2/models/synthetics_suite_types.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 66c2a10ceb07..d649e7294735 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17446,6 +17446,70 @@ components: required: - data type: object + DeletedSuiteResponseData: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuiteResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + type: object + DeletedSuiteResponseDataAttributes: + properties: + deleted_at: + description: Deletion timestamp of the Synthetic suite ID. + type: string + public_id: + description: The Synthetic suite ID deleted. + type: string + type: object + DeletedSuitesRequestDelete: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteAttributes' + id: + type: string + type: + $ref: '#/components/schemas/DeletedSuitesRequestType' + required: + - attributes + type: object + DeletedSuitesRequestDeleteAttributes: + properties: + force_delete_dependencies: + type: boolean + public_ids: + example: + - '' + items: + type: string + type: array + required: + - public_ids + type: object + DeletedSuitesRequestDeleteRequest: + properties: + data: + $ref: '#/components/schemas/DeletedSuitesRequestDelete' + required: + - data + type: object + DeletedSuitesRequestType: + default: delete_suites_request + enum: + - delete_suites_request + example: delete_suites_request + type: string + x-enum-varnames: + - DELETE_SUITES_REQUEST + DeletedSuitesResponse: + properties: + data: + items: + $ref: '#/components/schemas/DeletedSuiteResponseData' + type: array + type: object DependencyLocation: description: Static library vulnerability location. properties: @@ -49506,18 +49570,6 @@ components: meta: $ref: '#/components/schemas/ResponseMetaAttributes' type: object - SecurityMonitoringPaginatedSuppressionsResponse: - description: Response object containing the available suppression rules with - pagination metadata. - properties: - data: - description: A list of suppressions objects. - items: - $ref: '#/components/schemas/SecurityMonitoringSuppression' - type: array - meta: - $ref: '#/components/schemas/SecurityMonitoringSuppressionsMeta' - type: object SecurityMonitoringReferenceTable: description: Reference tables used in the queries. properties: @@ -51667,31 +51719,6 @@ components: data: $ref: '#/components/schemas/SecurityMonitoringSuppression' type: object - SecurityMonitoringSuppressionSort: - description: The sort parameters used for querying suppression rules. - enum: - - name - - start_date - - expiration_date - - update_date - - enabled - - -name - - -start_date - - -expiration_date - - -update_date - - -enabled - type: string - x-enum-varnames: - - NAME - - START_DATE - - EXPIRATION_DATE - - UPDATE_DATE - - ENABLED - - NAME_DESCENDING - - START_DATE_DESCENDING - - EXPIRATION_DATE_DESCENDING - - UPDATE_DATE_DESCENDING - - ENABLED_DESCENDING SecurityMonitoringSuppressionType: default: suppressions description: The type of the resource. The value should always be `suppressions`. @@ -51787,31 +51814,6 @@ components: required: - data type: object - SecurityMonitoringSuppressionsMeta: - description: Metadata for the suppression list response. - properties: - page: - $ref: '#/components/schemas/SecurityMonitoringSuppressionsPageMeta' - type: object - SecurityMonitoringSuppressionsPageMeta: - description: Pagination metadata. - properties: - pageNumber: - description: Current page number. - example: 0 - format: int64 - type: integer - pageSize: - description: Current page size. - example: 2 - format: int64 - type: integer - totalCount: - description: Total count of suppressions. - example: 2 - format: int64 - type: integer - type: object SecurityMonitoringSuppressionsResponse: description: Response object containing the available suppression rules. properties: @@ -55495,6 +55497,31 @@ components: format: double type: number type: object + SuiteCreateEdit: + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + required: + - attributes + - type + type: object + SuiteCreateEditRequest: + properties: + data: + $ref: '#/components/schemas/SuiteCreateEdit' + required: + - data + type: object + SuiteSearchResponseType: + default: suites_search + enum: + - suites_search + example: suites_search + type: string + x-enum-varnames: + - SUITES_SEARCH SuppressionVersionHistory: description: Response object containing the version history of a suppression. properties: @@ -55678,6 +55705,149 @@ components: example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx type: string type: array + SyntheticsSuite: + description: Object containing details about a Synthetic suite. + properties: + message: + description: Notification message associated with the suite. + example: Notification message + type: string + monitor_id: + description: The associated monitor ID. + example: 12345678 + format: int64 + readOnly: true + type: integer + name: + description: Name of the suite. + example: Example suite name + type: string + options: + $ref: '#/components/schemas/SyntheticsSuiteOptions' + public_id: + description: The public ID for the test. + example: 123-abc-456 + readOnly: true + type: string + tags: + description: Array of tags attached to the suite. + example: + - env:production + items: + description: A tag attached to the suite. + type: string + type: array + tests: + items: + $ref: '#/components/schemas/SyntheticsSuiteTest' + type: array + type: + $ref: '#/components/schemas/SyntheticsSuiteType' + required: + - name + - type + - tests + - options + type: object + SyntheticsSuiteOptions: + description: Object describing the extra options for a Synthetic suite. + properties: + alerting_threshold: + description: Percentage of critical tests failure needed for a suite to + fail. + format: double + maximum: 1 + minimum: 0 + type: number + type: object + SyntheticsSuiteResponse: + description: Synthetics suite response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteResponseData' + type: object + SyntheticsSuiteResponseData: + description: Synthetics suite response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + id: + description: The public ID for the suite. + example: 123-abc-456 + readOnly: true + type: string + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + type: object + SyntheticsSuiteSearchResponse: + description: Synthetics suite search response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseData' + type: object + SyntheticsSuiteSearchResponseData: + description: Synthetics suite search response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseDataAttributes' + id: + format: uuid + type: string + type: + $ref: '#/components/schemas/SuiteSearchResponseType' + type: object + SyntheticsSuiteSearchResponseDataAttributes: + description: Synthetics suite search response data attributes + properties: + suites: + items: + $ref: '#/components/schemas/SyntheticsSuite' + type: array + total: + format: int32 + maximum: 2147483647 + type: integer + type: object + SyntheticsSuiteTest: + description: Object containing details about a Synthetic test included in a + Synthetic suite. + properties: + alerting_criticality: + $ref: '#/components/schemas/SyntheticsSuiteTestAlertingCriticality' + public_id: + example: '' + type: string + required: + - public_id + type: object + SyntheticsSuiteTestAlertingCriticality: + description: Alerting criticality for each the test. + enum: + - ignore + - critical + example: critical + type: string + x-enum-varnames: + - IGNORE + - CRITICAL + SyntheticsSuiteType: + default: suite + description: Type of the Synthetic suite, `suite`. + enum: + - suite + example: suite + type: string + x-enum-varnames: + - SUITE + SyntheticsSuiteTypes: + default: suites + description: Type for the Synthetics suites responses, `suites`. + enum: + - suites + example: suites + type: string + x-enum-varnames: + - SUITES SyntheticsVariableParser: description: Details of the parser to use for the global variable. example: @@ -86189,29 +86359,12 @@ paths: required: false schema: type: string - - description: Attribute used to sort the list of suppression rules. Prefix - with `-` to sort in descending order. - in: query - name: sort - required: false - schema: - $ref: '#/components/schemas/SecurityMonitoringSuppressionSort' - - description: Size for a given page. Use `-1` to return all items. - in: query - name: page[size] - required: false - schema: - default: -1 - example: 10 - format: int64 - type: integer - - $ref: '#/components/parameters/PageNumber' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SecurityMonitoringPaginatedSuppressionsResponse' + $ref: '#/components/schemas/SecurityMonitoringSuppressionsResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -89175,6 +89328,227 @@ paths: operator: OR permissions: - billing_edit + /api/v2/synthetics/suites: + post: + operationId: CreateSyntheticsSuite + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Create a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + - synthetics_create_edit_trigger + /api/v2/synthetics/suites/bulk-delete: + post: + operationId: DeleteSyntheticsSuites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Bulk delete suites' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/synthetics/suites/search: + get: + description: Search for Synthetics suites. + operationId: SearchSuites + parameters: + - description: The search query. + in: query + name: query + required: false + schema: + type: string + - description: The sort order for the results (e.g., `name,asc` or `name,desc`). + in: query + name: sort + required: false + schema: + default: name,asc + type: string + - description: If true, return only facets instead of full test details. + in: query + name: facets_only + required: false + schema: + default: false + type: boolean + - description: The offset from which to start returning results. + in: query + name: start + required: false + schema: + default: 0 + format: int64 + type: integer + - description: The maximum number of results to return. + in: query + name: count + required: false + schema: + default: 50 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Search Synthetics suites + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/suites/{public_id}: + get: + operationId: GetSyntheticsSuite + parameters: + - description: The public ID of the suite to get details from. + in: path + name: public_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: 'Synthetics: Get a suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + put: + operationId: EditSyntheticsSuite + parameters: + - description: The public ID of the suite to edit. + in: path + name: public_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + description: New suite details to be saved. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Edit a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write /api/v2/synthetics/variables/{variable_id}/jsonpatch: patch: description: 'Patch a global variable using JSON Patch (RFC 6902). diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen index ec35b858851a..3f3e3c99f212 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:03.168Z \ No newline at end of file +2025-11-07T12:27:26.759Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml index 37f25710f244..e3828707dc72 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"itm-ljs-0qw","type":"suppressions","attributes":{"creation_date":1768411744411,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","editable":true,"enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744411,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uea-lab-big","type":"suppressions","attributes":{"creation_date":1762518447002,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","editable":true,"enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447002,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,14 +23,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big response: body: encoding: UTF-8 @@ -41,18 +39,18 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big response: body: encoding: UTF-8 - string: '{"errors":["not_found(Suppression with ID itm-ljs-0qw not found)"]}' + string: '{"errors":["not_found(Suppression with ID uea-lab-big not found)"]}' headers: Content-Type: - application/json diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen index 16f1a15eddce..a93a4d20e755 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:04.856Z \ No newline at end of file +2025-11-07T12:27:27.654Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml index 6021eaad9675..21d50015e7c7 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,20 +23,19 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -46,14 +43,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen index 669132641329..d0d5ccec313b 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.317Z \ No newline at end of file +2025-11-26T13:33:06.482Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml index 26e1a51de103..84c317daea05 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,45 +14,39 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppressions","attributes":{"creation_date":1768411745430,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745430,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"version":1}}}' + string: '{"data":{"id":"456-piv-74h","type":"suppressions","attributes":{"creation_date":1764163986851,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","editable":true,"enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1764163986851,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h/version_history response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"sro-unv-k08","name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"creation_date":1768411745430,"update_date":1768411745430,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' + string: '{"data":{"id":"456-piv-74h","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"456-piv-74h","name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"frog@datadoghq.com","name":"frog"},"creation_date":1764163986851,"update_date":1764163986851,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen deleted file mode 100644 index 23cdf460db77..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:28.523Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml deleted file mode 100644 index 5d0f6038306e..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml +++ /dev/null @@ -1,101 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"lgh-7no-380","type":"suppressions","attributes":{"creation_date":1768410749324,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410749324,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?page%5Bsize%5D=1&page%5Bnumber%5D=0&query=id%3Afgz-hyr-ibu%20OR%20id%3Algh-7no-380 - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":1,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/lgh-7no-380 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fgz-hyr-ibu - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen deleted file mode 100644 index 89bfc8cd8ef8..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:30.925Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml deleted file mode 100644 index 0e765861acf4..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml +++ /dev/null @@ -1,102 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=name&query=id%3A5cq-vnw-eza%20OR%20id%3Afuu-xxd-kjd - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fuu-xxd-kjd - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/5cq-vnw-eza - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen deleted file mode 100644 index d184a46ea082..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:33.088Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml deleted file mode 100644 index 8b1f589c4673..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml +++ /dev/null @@ -1,102 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=-name&query=id%3Aosw-qyf-tqn%20OR%20id%3Ape9-gdi-ee2 - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/pe9-gdi-ee2 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/osw-qyf-tqn - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen index e05f55dd7103..8839a50677d9 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.825Z \ No newline at end of file +2025-11-07T12:27:28.613Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml index 55f2cb1ff7b6..4fb6f154adef 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745950,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518448839,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: encoding: UTF-8 @@ -36,14 +34,13 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:staging - status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411746111,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:staging + status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518449150,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":2}}}' headers: Content-Type: @@ -51,14 +48,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.frozen new file mode 100644 index 000000000000..768dee23bbce --- /dev/null +++ b/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-07T12:38:44.484Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.yml b/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.yml new file mode 100644 index 000000000000..52c96543bb1d --- /dev/null +++ b/cassettes/features/v2/synthetics/Search-Synthetics-suites-returns-OK-response.yml @@ -0,0 +1,81 @@ +http_interactions: +- recorded_at: Wed, 07 Jan 2026 12:38:44 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/synthetics/suites/search + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"suites_search","attributes":{"suites":[{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-12T14:36:38.194974+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765550180,"monitor_id":243683630,"tests":[],"notifications":[],"public_id":"q9j-u8p-3v5","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-12T15:13:58.194856+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765552435,"monitor_id":243691225,"tests":[],"notifications":[],"public_id":"qqj-ma8-msw","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-12T13:58:21.265235+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765547882,"monitor_id":243678032,"tests":[],"notifications":[],"public_id":"qwt-zcd-3e7","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-16T21:23:27.482218+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765920189,"monitor_id":244824489,"tests":[],"notifications":[],"public_id":"yya-xnv-r72","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2026-01-06T14:31:13.144659+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1767709878,"monitor_id":248911428,"tests":[],"notifications":[],"public_id":"37x-cfh-hik","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-12T14:52:23.813142+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765551141,"monitor_id":243686361,"tests":[],"notifications":[],"public_id":"y9a-9jy-ng2","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T14:02:40.227969+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765807338,"monitor_id":244243608,"tests":[],"notifications":[],"public_id":"45f-82u-p2d","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T14:22:09.594574+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765808505,"monitor_id":244250055,"tests":[],"notifications":[],"public_id":"xd9-dws-cm2","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T15:36:44.135107+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765813000,"monitor_id":244276690,"tests":[],"notifications":[],"public_id":"77s-9gi-8pa","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-16T09:42:02.245892+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765878101,"monitor_id":244658021,"tests":[],"notifications":[],"public_id":"xft-zns-y58","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-16T09:52:14.327958+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765878721,"monitor_id":244659781,"tests":[],"notifications":[],"public_id":"9ne-jp8-bbs","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-19T09:34:53.578670+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1766136882,"monitor_id":245439882,"tests":[],"notifications":[],"public_id":"rcp-hsx-ksp","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-09T10:37:16.189540+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765276630,"monitor_id":242864230,"tests":[],"notifications":[],"public_id":"ihb-7cb-mbq","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-12T14:58:39.394977+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765551515,"monitor_id":243687635,"tests":[],"notifications":[],"public_id":"m4t-g9e-cht","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T13:27:01.650049+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765805206,"monitor_id":244230166,"tests":[],"notifications":[],"public_id":"3rn-xv7-3gw","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T13:55:29.070758+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765806925,"monitor_id":244240495,"tests":[],"notifications":[],"public_id":"u5z-r6t-6gj","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-15T15:48:08.393886+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765813664,"monitor_id":244283444,"tests":[],"notifications":[],"public_id":"fug-wqb-jgm","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2025-12-17T08:57:02.235129+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765961806,"monitor_id":244953226,"tests":[],"notifications":[],"public_id":"tmj-mmm-6rw","tags":["env:production"]},{"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No + Data","type":"suite","modified_at":"2026-01-06T13:52:15.675454+00:00","name":"Example + suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1767707530,"monitor_id":248904310,"tests":[],"notifications":[],"public_id":"pkr-4b7-tug","tags":["env:production"]}],"facets":[{"name":"mobile_platform","values":[]},{"name":"test_count","values":[{"name":"0","count":19}]},{"name":"step_count","values":[]},{"name":"http_path","values":[]},{"name":"team","values":[]},{"name":"type","values":[{"name":"suite","count":19}]},{"name":"env","values":[{"name":"production","count":19}]},{"name":"creator","values":[{"name":"CI + Account","count":19}]},{"name":"mobile_application","values":[]},{"name":"notification","values":[]},{"name":"endpoint","values":[]},{"name":"http_method","values":[]},{"name":"creation_source","values":[]},{"name":"domain","values":[]},{"name":"ci_execution_rule","values":[{"name":"blocking","count":19}]},{"name":"tag","values":[{"name":"env:production","count":19}]},{"name":"state","values":[{"name":"paused","count":19}]},{"name":"region","values":[]},{"name":"muted","values":[{"name":"0","count":19}]},{"name":"status","values":[{"name":"No + Data","count":19}]}],"total":19},"id":"74278a23-c9ce-4093-816d-7109fb05adb5"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.frozen new file mode 100644 index 000000000000..62723cd8d29a --- /dev/null +++ b/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-07T12:38:45.716Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.yml b/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.yml new file mode 100644 index 000000000000..8a68218d5475 --- /dev/null +++ b/cassettes/features/v2/synthetics/Synthetics-Create-a-test-suite-returns-OK-response.yml @@ -0,0 +1,55 @@ +http_interactions: +- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"message":"Notification message","name":"Example + suite name","options":{},"tags":["env:production"],"tests":[],"type":"suite"},"type":"suites"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/synthetics/suites + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"suites","id":"36n-bb6-njj","attributes":{"tags":["env:production"],"type":"suite","created_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"created_at":"2026-01-07T12:38:46.109472+00:00","modified_at":"2026-01-07T12:38:46.109472+00:00","message":"Notification + message","public_id":"36n-bb6-njj","options":{},"modified_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"tests":[],"name":"Example suite name","org_id":321813,"monitor_id":249141773}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"public_ids":["36n-bb6-njj"]},"type":"delete_suites_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/synthetics/suites/bulk-delete + response: + body: + encoding: UTF-8 + string: '{"data":[{"type":"suites","attributes":{"public_id":"36n-bb6-njj","deleted_at":"2026-01-07 + 12:38:46.679914"},"id":"36n-bb6-njj"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb deleted file mode 100644 index e4d8b50b439c..000000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Get all suppression rules returns "OK" response with sort ascending - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - sort: SecurityMonitoringSuppressionSort::NAME, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb deleted file mode 100644 index ea5cdb65b906..000000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Get all suppression rules returns "OK" response with sort descending - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - sort: SecurityMonitoringSuppressionSort::NAME_DESCENDING, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb deleted file mode 100644 index 5e38d9bb5715..000000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get all suppression rules returns "OK" response with pagination - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - page_size: 1, - page_number: 0, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.rb b/examples/v2/synthetics/CreateSyntheticsSuite.rb new file mode 100644 index 000000000000..c99f99f42ecd --- /dev/null +++ b/examples/v2/synthetics/CreateSyntheticsSuite.rb @@ -0,0 +1,21 @@ +# Synthetics: Create a test suite returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new + +body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({ + data: DatadogAPIClient::V2::SuiteCreateEdit.new({ + attributes: DatadogAPIClient::V2::SyntheticsSuite.new({ + message: "Notification message", + name: "Example suite name", + options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({}), + tags: [ + "env:production", + ], + tests: [], + type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE, + }), + type: DatadogAPIClient::V2::SyntheticsSuiteTypes::SUITES, + }), +}) +p api_instance.create_synthetics_suite(body) diff --git a/examples/v2/synthetics/DeleteSyntheticsSuites.rb b/examples/v2/synthetics/DeleteSyntheticsSuites.rb new file mode 100644 index 000000000000..9fc672939f6f --- /dev/null +++ b/examples/v2/synthetics/DeleteSyntheticsSuites.rb @@ -0,0 +1,16 @@ +# Synthetics: Bulk delete suites returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new + +body = DatadogAPIClient::V2::DeletedSuitesRequestDeleteRequest.new({ + data: DatadogAPIClient::V2::DeletedSuitesRequestDelete.new({ + attributes: DatadogAPIClient::V2::DeletedSuitesRequestDeleteAttributes.new({ + public_ids: [ + "", + ], + }), + type: DatadogAPIClient::V2::DeletedSuitesRequestType::DELETE_SUITES_REQUEST, + }), +}) +p api_instance.delete_synthetics_suites(body) diff --git a/examples/v2/synthetics/EditSyntheticsSuite.rb b/examples/v2/synthetics/EditSyntheticsSuite.rb new file mode 100644 index 000000000000..8ac5baf0f943 --- /dev/null +++ b/examples/v2/synthetics/EditSyntheticsSuite.rb @@ -0,0 +1,26 @@ +# Synthetics: Edit a test suite returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new + +body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({ + data: DatadogAPIClient::V2::SuiteCreateEdit.new({ + attributes: DatadogAPIClient::V2::SyntheticsSuite.new({ + message: "Notification message", + name: "Example suite name", + options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({}), + tags: [ + "env:production", + ], + tests: [ + DatadogAPIClient::V2::SyntheticsSuiteTest.new({ + alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL, + public_id: "", + }), + ], + type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE, + }), + type: DatadogAPIClient::V2::SyntheticsSuiteTypes::SUITES, + }), +}) +p api_instance.edit_synthetics_suite("public_id", body) diff --git a/examples/v2/synthetics/GetSyntheticsSuite.rb b/examples/v2/synthetics/GetSyntheticsSuite.rb new file mode 100644 index 000000000000..8f59d470bfe2 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsSuite.rb @@ -0,0 +1,5 @@ +# Synthetics: Get a suite returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.get_synthetics_suite("public_id") diff --git a/examples/v2/synthetics/SearchSuites.rb b/examples/v2/synthetics/SearchSuites.rb new file mode 100644 index 000000000000..019cf372d516 --- /dev/null +++ b/examples/v2/synthetics/SearchSuites.rb @@ -0,0 +1,5 @@ +# Search Synthetics suites returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.search_suites() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 8718f9542833..76188be1b921 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1559,9 +1559,6 @@ }, "v2.ListSecurityMonitoringSuppressions" => { "query" => "String", - "sort" => "SecurityMonitoringSuppressionSort", - "page_size" => "Integer", - "page_number" => "Integer", }, "v2.CreateSecurityMonitoringSuppression" => { "body" => "SecurityMonitoringSuppressionCreateRequest", @@ -3285,6 +3282,26 @@ "v2.SetOnDemandConcurrencyCap" => { "body" => "OnDemandConcurrencyCapAttributes", }, + "v2.CreateSyntheticsSuite" => { + "body" => "SuiteCreateEditRequest", + }, + "v2.DeleteSyntheticsSuites" => { + "body" => "DeletedSuitesRequestDeleteRequest", + }, + "v2.SearchSuites" => { + "query" => "String", + "sort" => "String", + "facets_only" => "Boolean", + "start" => "Integer", + "count" => "Integer", + }, + "v2.GetSyntheticsSuite" => { + "public_id" => "String", + }, + "v2.EditSyntheticsSuite" => { + "public_id" => "String", + "body" => "SuiteCreateEditRequest", + }, "v2.PatchGlobalVariable" => { "variable_id" => "String", "body" => "GlobalVariableJsonPatchRequest", diff --git a/features/v2/given.json b/features/v2/given.json index 9d69fd33f222..c717223ca711 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1035,7 +1035,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" } ], "step": "there is a valid \"suppression\" in the system", @@ -1043,18 +1043,6 @@ "tag": "Security Monitoring", "operationId": "CreateSecurityMonitoringSuppression" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression2 {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" - } - ], - "step": "there is a valid \"suppression2\" in the system", - "key": "suppression2", - "tag": "Security Monitoring", - "operationId": "CreateSecurityMonitoringSuppression" - }, { "parameters": [ { diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 60e9df68bb9c..2a6c599c3060 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -1124,40 +1124,6 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with pagination - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "page[size]" parameter with value 1 - And request contains "page[number]" parameter with value 0 - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with sort ascending - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "sort" parameter with value "name" - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression {{ unique }}" - - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with sort descending - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "sort" parameter with value "-name" - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression2 {{ unique }}" - @skip @team:DataDog/k9-cloud-security-platform Scenario: Get critical assets affecting a specific rule returns "Not Found" response Given new "GetCriticalAssetsAffectingRule" request diff --git a/features/v2/synthetics.feature b/features/v2/synthetics.feature index 133993b11b7b..5697490c97b3 100644 --- a/features/v2/synthetics.feature +++ b/features/v2/synthetics.feature @@ -51,3 +51,73 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK And the response "data.attributes.on_demand_concurrency_cap" is equal to 20 + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "API error response." response + Given new "SearchSuites" request + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "OK" response + Given new "SearchSuites" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "API error response." response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "OK" response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "API error response." response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "OK" response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Edit a test suite returns "API error response." response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Edit a test suite returns "OK" response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "API error response." response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "OK" response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 1cd2195bba17..b8cb14962299 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4646,6 +4646,43 @@ "type": "safe" } }, + "CreateSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "operationId": "DeleteSyntheticsSuites", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ data.attributes.public_id }}\"]}}}" + } + ], + "type": "unsafe" + } + }, + "DeleteSyntheticsSuites": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, + "SearchSuites": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "EditSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "PatchGlobalVariable": { "tag": "Synthetics", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 2d73f33509d5..73975d5e3831 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1963,6 +1963,13 @@ def overrides "v2.delete_apps_response" => "DeleteAppsResponse", "v2.delete_apps_response_data_items" => "DeleteAppsResponseDataItems", "v2.delete_custom_framework_response" => "DeleteCustomFrameworkResponse", + "v2.deleted_suite_response_data" => "DeletedSuiteResponseData", + "v2.deleted_suite_response_data_attributes" => "DeletedSuiteResponseDataAttributes", + "v2.deleted_suites_request_delete" => "DeletedSuitesRequestDelete", + "v2.deleted_suites_request_delete_attributes" => "DeletedSuitesRequestDeleteAttributes", + "v2.deleted_suites_request_delete_request" => "DeletedSuitesRequestDeleteRequest", + "v2.deleted_suites_request_type" => "DeletedSuitesRequestType", + "v2.deleted_suites_response" => "DeletedSuitesResponse", "v2.dependency_location" => "DependencyLocation", "v2.deployment" => "Deployment", "v2.deployment_attributes" => "DeploymentAttributes", @@ -4085,7 +4092,6 @@ def overrides "v2.security_monitoring_filter" => "SecurityMonitoringFilter", "v2.security_monitoring_filter_action" => "SecurityMonitoringFilterAction", "v2.security_monitoring_list_rules_response" => "SecurityMonitoringListRulesResponse", - "v2.security_monitoring_paginated_suppressions_response" => "SecurityMonitoringPaginatedSuppressionsResponse", "v2.security_monitoring_reference_table" => "SecurityMonitoringReferenceTable", "v2.security_monitoring_rule_anomaly_detection_options" => "SecurityMonitoringRuleAnomalyDetectionOptions", "v2.security_monitoring_rule_anomaly_detection_options_bucket_duration" => "SecurityMonitoringRuleAnomalyDetectionOptionsBucketDuration", @@ -4176,9 +4182,6 @@ def overrides "v2.security_monitoring_suppression_create_data" => "SecurityMonitoringSuppressionCreateData", "v2.security_monitoring_suppression_create_request" => "SecurityMonitoringSuppressionCreateRequest", "v2.security_monitoring_suppression_response" => "SecurityMonitoringSuppressionResponse", - "v2.security_monitoring_suppressions_meta" => "SecurityMonitoringSuppressionsMeta", - "v2.security_monitoring_suppression_sort" => "SecurityMonitoringSuppressionSort", - "v2.security_monitoring_suppressions_page_meta" => "SecurityMonitoringSuppressionsPageMeta", "v2.security_monitoring_suppressions_response" => "SecurityMonitoringSuppressionsResponse", "v2.security_monitoring_suppression_type" => "SecurityMonitoringSuppressionType", "v2.security_monitoring_suppression_update_attributes" => "SecurityMonitoringSuppressionUpdateAttributes", @@ -4447,6 +4450,9 @@ def overrides "v2.step" => "Step", "v2.step_display" => "StepDisplay", "v2.step_display_bounds" => "StepDisplayBounds", + "v2.suite_create_edit" => "SuiteCreateEdit", + "v2.suite_create_edit_request" => "SuiteCreateEditRequest", + "v2.suite_search_response_type" => "SuiteSearchResponseType", "v2.suppression_version_history" => "SuppressionVersionHistory", "v2.suppression_versions" => "SuppressionVersions", "v2.synthetics_global_variable" => "SyntheticsGlobalVariable", @@ -4457,6 +4463,17 @@ def overrides "v2.synthetics_global_variable_parse_test_options_type" => "SyntheticsGlobalVariableParseTestOptionsType", "v2.synthetics_global_variable_totp_parameters" => "SyntheticsGlobalVariableTOTPParameters", "v2.synthetics_global_variable_value" => "SyntheticsGlobalVariableValue", + "v2.synthetics_suite" => "SyntheticsSuite", + "v2.synthetics_suite_options" => "SyntheticsSuiteOptions", + "v2.synthetics_suite_response" => "SyntheticsSuiteResponse", + "v2.synthetics_suite_response_data" => "SyntheticsSuiteResponseData", + "v2.synthetics_suite_search_response" => "SyntheticsSuiteSearchResponse", + "v2.synthetics_suite_search_response_data" => "SyntheticsSuiteSearchResponseData", + "v2.synthetics_suite_search_response_data_attributes" => "SyntheticsSuiteSearchResponseDataAttributes", + "v2.synthetics_suite_test" => "SyntheticsSuiteTest", + "v2.synthetics_suite_test_alerting_criticality" => "SyntheticsSuiteTestAlertingCriticality", + "v2.synthetics_suite_type" => "SyntheticsSuiteType", + "v2.synthetics_suite_types" => "SyntheticsSuiteTypes", "v2.synthetics_variable_parser" => "SyntheticsVariableParser", "v2.table_result_v2" => "TableResultV2", "v2.table_result_v2_array" => "TableResultV2Array", diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index a62476064c5c..f8bc15c5bccf 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -4384,28 +4384,18 @@ def list_security_monitoring_suppressions(opts = {}) # # @param opts [Hash] the optional parameters # @option opts [String] :query Query string. - # @option opts [SecurityMonitoringSuppressionSort] :sort Attribute used to sort the list of suppression rules. Prefix with `-` to sort in descending order. - # @option opts [Integer] :page_size Size for a given page. Use `-1` to return all items. - # @option opts [Integer] :page_number Specific page number to return. - # @return [Array<(SecurityMonitoringPaginatedSuppressionsResponse, Integer, Hash)>] SecurityMonitoringPaginatedSuppressionsResponse data, response status code and response headers + # @return [Array<(SecurityMonitoringSuppressionsResponse, Integer, Hash)>] SecurityMonitoringSuppressionsResponse data, response status code and response headers def list_security_monitoring_suppressions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_suppressions ...' end - allowable_values = ['name', 'start_date', 'expiration_date', 'update_date', 'enabled', '-name', '-start_date', '-expiration_date', '-update_date', '-enabled'] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" - end # resource path local_var_path = '/api/v2/security_monitoring/configuration/suppressions' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? # header parameters header_params = opts[:header_params] || {} @@ -4419,7 +4409,7 @@ def list_security_monitoring_suppressions_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringPaginatedSuppressionsResponse' + return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] diff --git a/lib/datadog_api_client/v2/api/synthetics_api.rb b/lib/datadog_api_client/v2/api/synthetics_api.rb index 4132779827f4..f9745f06e547 100644 --- a/lib/datadog_api_client/v2/api/synthetics_api.rb +++ b/lib/datadog_api_client/v2/api/synthetics_api.rb @@ -23,6 +23,203 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Synthetics: Create a test suite. + # + # @see #create_synthetics_suite_with_http_info + def create_synthetics_suite(body, opts = {}) + data, _status_code, _headers = create_synthetics_suite_with_http_info(body, opts) + data + end + + # Synthetics: Create a test suite. + # @param body [SuiteCreateEditRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(SyntheticsSuiteResponse, Integer, Hash)>] SyntheticsSuiteResponse data, response status code and response headers + def create_synthetics_suite_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_synthetics_suite ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SyntheticsAPI.create_synthetics_suite" + end + # resource path + local_var_path = '/api/v2/synthetics/suites' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsSuiteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_synthetics_suite, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#create_synthetics_suite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Synthetics: Bulk delete suites. + # + # @see #delete_synthetics_suites_with_http_info + def delete_synthetics_suites(body, opts = {}) + data, _status_code, _headers = delete_synthetics_suites_with_http_info(body, opts) + data + end + + # Synthetics: Bulk delete suites. + # @param body [DeletedSuitesRequestDeleteRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(DeletedSuitesResponse, Integer, Hash)>] DeletedSuitesResponse data, response status code and response headers + def delete_synthetics_suites_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.delete_synthetics_suites ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SyntheticsAPI.delete_synthetics_suites" + end + # resource path + local_var_path = '/api/v2/synthetics/suites/bulk-delete' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'DeletedSuitesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_synthetics_suites, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#delete_synthetics_suites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Synthetics: Edit a test suite. + # + # @see #edit_synthetics_suite_with_http_info + def edit_synthetics_suite(public_id, body, opts = {}) + data, _status_code, _headers = edit_synthetics_suite_with_http_info(public_id, body, opts) + data + end + + # Synthetics: Edit a test suite. + # @param public_id [String] The public ID of the suite to edit. + # @param body [SuiteCreateEditRequest] New suite details to be saved. + # @param opts [Hash] the optional parameters + # @return [Array<(SyntheticsSuiteResponse, Integer, Hash)>] SyntheticsSuiteResponse data, response status code and response headers + def edit_synthetics_suite_with_http_info(public_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.edit_synthetics_suite ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.edit_synthetics_suite" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SyntheticsAPI.edit_synthetics_suite" + end + # resource path + local_var_path = '/api/v2/synthetics/suites/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsSuiteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :edit_synthetics_suite, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#edit_synthetics_suite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get the on-demand concurrency cap. # # @see #get_on_demand_concurrency_cap_with_http_info @@ -83,6 +280,68 @@ def get_on_demand_concurrency_cap_with_http_info(opts = {}) return data, status_code, headers end + # Synthetics: Get a suite. + # + # @see #get_synthetics_suite_with_http_info + def get_synthetics_suite(public_id, opts = {}) + data, _status_code, _headers = get_synthetics_suite_with_http_info(public_id, opts) + data + end + + # Synthetics: Get a suite. + # @param public_id [String] The public ID of the suite to get details from. + # @param opts [Hash] the optional parameters + # @return [Array<(SyntheticsSuiteResponse, Integer, Hash)>] SyntheticsSuiteResponse data, response status code and response headers + def get_synthetics_suite_with_http_info(public_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_suite ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_synthetics_suite" + end + # resource path + local_var_path = '/api/v2/synthetics/suites/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsSuiteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_synthetics_suite, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#get_synthetics_suite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Patch a global variable. # # @see #patch_global_variable_with_http_info @@ -162,6 +421,76 @@ def patch_global_variable_with_http_info(variable_id, body, opts = {}) return data, status_code, headers end + # Search Synthetics suites. + # + # @see #search_suites_with_http_info + def search_suites(opts = {}) + data, _status_code, _headers = search_suites_with_http_info(opts) + data + end + + # Search Synthetics suites. + # + # Search for Synthetics suites. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :query The search query. + # @option opts [String] :sort The sort order for the results (e.g., `name,asc` or `name,desc`). + # @option opts [Boolean] :facets_only If true, return only facets instead of full test details. + # @option opts [Integer] :start The offset from which to start returning results. + # @option opts [Integer] :count The maximum number of results to return. + # @return [Array<(SyntheticsSuiteSearchResponse, Integer, Hash)>] SyntheticsSuiteSearchResponse data, response status code and response headers + def search_suites_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.search_suites ...' + end + # resource path + local_var_path = '/api/v2/synthetics/suites/search' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'facets_only'] = opts[:'facets_only'] if !opts[:'facets_only'].nil? + query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? + query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsSuiteSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :search_suites, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#search_suites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Save new value for on-demand concurrency cap. # # @see #set_on_demand_concurrency_cap_with_http_info diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb b/lib/datadog_api_client/v2/models/deleted_suite_response_data.rb similarity index 71% rename from lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb rename to lib/datadog_api_client/v2/models/deleted_suite_response_data.rb index 35152ade3c36..202db61e3042 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb +++ b/lib/datadog_api_client/v2/models/deleted_suite_response_data.rb @@ -17,18 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Pagination metadata. - class SecurityMonitoringSuppressionsPageMeta + # + class DeletedSuiteResponseData include BaseGenericModel - # Current page number. - attr_accessor :page_number + # + attr_accessor :attributes - # Current page size. - attr_accessor :page_size + # + attr_accessor :id - # Total count of suppressions. - attr_accessor :total_count + # Type for the Synthetics suites responses, `suites`. + attr_accessor :type attr_accessor :additional_properties @@ -36,9 +36,9 @@ class SecurityMonitoringSuppressionsPageMeta # @!visibility private def self.attribute_map { - :'page_number' => :'pageNumber', - :'page_size' => :'pageSize', - :'total_count' => :'totalCount' + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' } end @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'page_number' => :'Integer', - :'page_size' => :'Integer', - :'total_count' => :'Integer' + :'attributes' => :'DeletedSuiteResponseDataAttributes', + :'id' => :'String', + :'type' => :'SyntheticsSuiteTypes' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsPageMeta` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuiteResponseData` initialize method" end self.additional_properties = {} @@ -70,16 +70,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'page_number') - self.page_number = attributes[:'page_number'] + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:'id') + self.id = attributes[:'id'] end - if attributes.key?(:'total_count') - self.total_count = attributes[:'total_count'] + if attributes.key?(:'type') + self.type = attributes[:'type'] end end @@ -109,9 +109,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - page_number == o.page_number && - page_size == o.page_size && - total_count == o.total_count && + attributes == o.attributes && + id == o.id && + type == o.type && additional_properties == o.additional_properties end @@ -119,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [page_number, page_size, total_count, additional_properties].hash + [attributes, id, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/deleted_suite_response_data_attributes.rb b/lib/datadog_api_client/v2/models/deleted_suite_response_data_attributes.rb new file mode 100644 index 000000000000..f8310add9bfc --- /dev/null +++ b/lib/datadog_api_client/v2/models/deleted_suite_response_data_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DeletedSuiteResponseDataAttributes + include BaseGenericModel + + # Deletion timestamp of the Synthetic suite ID. + attr_accessor :deleted_at + + # The Synthetic suite ID deleted. + attr_accessor :public_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'deleted_at' => :'deleted_at', + :'public_id' => :'public_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'deleted_at' => :'String', + :'public_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuiteResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'public_id') + self.public_id = attributes[:'public_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deleted_at == o.deleted_at && + public_id == o.public_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [deleted_at, public_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deleted_suites_request_delete.rb b/lib/datadog_api_client/v2/models/deleted_suites_request_delete.rb new file mode 100644 index 000000000000..6c318869b42b --- /dev/null +++ b/lib/datadog_api_client/v2/models/deleted_suites_request_delete.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DeletedSuitesRequestDelete + include BaseGenericModel + + # + attr_reader :attributes + + # + attr_accessor :id + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DeletedSuitesRequestDeleteAttributes', + :'id' => :'String', + :'type' => :'DeletedSuitesRequestType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuitesRequestDelete` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deleted_suites_request_delete_attributes.rb b/lib/datadog_api_client/v2/models/deleted_suites_request_delete_attributes.rb new file mode 100644 index 000000000000..20b745942b16 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deleted_suites_request_delete_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DeletedSuitesRequestDeleteAttributes + include BaseGenericModel + + # + attr_accessor :force_delete_dependencies + + # + attr_reader :public_ids + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'force_delete_dependencies' => :'force_delete_dependencies', + :'public_ids' => :'public_ids' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'force_delete_dependencies' => :'Boolean', + :'public_ids' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuitesRequestDeleteAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'force_delete_dependencies') + self.force_delete_dependencies = attributes[:'force_delete_dependencies'] + end + + if attributes.key?(:'public_ids') + if (value = attributes[:'public_ids']).is_a?(Array) + self.public_ids = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @public_ids.nil? + true + end + + # Custom attribute writer method with validation + # @param public_ids [Object] Object to be assigned + # @!visibility private + def public_ids=(public_ids) + if public_ids.nil? + fail ArgumentError, 'invalid value for "public_ids", public_ids cannot be nil.' + end + @public_ids = public_ids + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + force_delete_dependencies == o.force_delete_dependencies && + public_ids == o.public_ids && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [force_delete_dependencies, public_ids, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deleted_suites_request_delete_request.rb b/lib/datadog_api_client/v2/models/deleted_suites_request_delete_request.rb new file mode 100644 index 000000000000..5f11299b5906 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deleted_suites_request_delete_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DeletedSuitesRequestDeleteRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DeletedSuitesRequestDelete' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuitesRequestDeleteRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb b/lib/datadog_api_client/v2/models/deleted_suites_request_type.rb similarity index 52% rename from lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb rename to lib/datadog_api_client/v2/models/deleted_suites_request_type.rb index ebcf5ce84f5e..d7dcd36b2eff 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb +++ b/lib/datadog_api_client/v2/models/deleted_suites_request_type.rb @@ -17,19 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # The sort parameters used for querying suppression rules. - class SecurityMonitoringSuppressionSort + # + class DeletedSuitesRequestType include BaseEnumModel - NAME = "name".freeze - START_DATE = "start_date".freeze - EXPIRATION_DATE = "expiration_date".freeze - UPDATE_DATE = "update_date".freeze - ENABLED = "enabled".freeze - NAME_DESCENDING = "-name".freeze - START_DATE_DESCENDING = "-start_date".freeze - EXPIRATION_DATE_DESCENDING = "-expiration_date".freeze - UPDATE_DATE_DESCENDING = "-update_date".freeze - ENABLED_DESCENDING = "-enabled".freeze + DELETE_SUITES_REQUEST = "delete_suites_request".freeze end end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb b/lib/datadog_api_client/v2/models/deleted_suites_response.rb similarity index 84% rename from lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb rename to lib/datadog_api_client/v2/models/deleted_suites_response.rb index 170b6a914c8a..5034223037c5 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb +++ b/lib/datadog_api_client/v2/models/deleted_suites_response.rb @@ -17,12 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # Metadata for the suppression list response. - class SecurityMonitoringSuppressionsMeta + # + class DeletedSuitesResponse include BaseGenericModel - # Pagination metadata. - attr_accessor :page + # + attr_accessor :data attr_accessor :additional_properties @@ -30,7 +30,7 @@ class SecurityMonitoringSuppressionsMeta # @!visibility private def self.attribute_map { - :'page' => :'page' + :'data' => :'data' } end @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'page' => :'SecurityMonitoringSuppressionsPageMeta' + :'data' => :'Array' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsMeta` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeletedSuitesResponse` initialize method" end self.additional_properties = {} @@ -60,8 +60,10 @@ def initialize(attributes = {}) end } - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end end end @@ -91,7 +93,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - page == o.page && + data == o.data && additional_properties == o.additional_properties end @@ -99,7 +101,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [page, additional_properties].hash + [data, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/suite_create_edit.rb b/lib/datadog_api_client/v2/models/suite_create_edit.rb new file mode 100644 index 000000000000..23af0d42811a --- /dev/null +++ b/lib/datadog_api_client/v2/models/suite_create_edit.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SuiteCreateEdit + include BaseGenericModel + + # Object containing details about a Synthetic suite. + attr_reader :attributes + + # Type for the Synthetics suites responses, `suites`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsSuite', + :'type' => :'SyntheticsSuiteTypes' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SuiteCreateEdit` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/suite_create_edit_request.rb b/lib/datadog_api_client/v2/models/suite_create_edit_request.rb new file mode 100644 index 000000000000..4648fa9c912f --- /dev/null +++ b/lib/datadog_api_client/v2/models/suite_create_edit_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SuiteCreateEditRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SuiteCreateEdit' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SuiteCreateEditRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/suite_search_response_type.rb b/lib/datadog_api_client/v2/models/suite_search_response_type.rb new file mode 100644 index 000000000000..e03387257fcc --- /dev/null +++ b/lib/datadog_api_client/v2/models/suite_search_response_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SuiteSearchResponseType + include BaseEnumModel + + SUITES_SEARCH = "suites_search".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite.rb b/lib/datadog_api_client/v2/models/synthetics_suite.rb new file mode 100644 index 000000000000..08cdb949da42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite.rb @@ -0,0 +1,230 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Object containing details about a Synthetic suite. + class SyntheticsSuite + include BaseGenericModel + + # Notification message associated with the suite. + attr_accessor :message + + # The associated monitor ID. + attr_accessor :monitor_id + + # Name of the suite. + attr_reader :name + + # Object describing the extra options for a Synthetic suite. + attr_reader :options + + # The public ID for the test. + attr_accessor :public_id + + # Array of tags attached to the suite. + attr_accessor :tags + + # + attr_reader :tests + + # Type of the Synthetic suite, `suite`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'message' => :'message', + :'monitor_id' => :'monitor_id', + :'name' => :'name', + :'options' => :'options', + :'public_id' => :'public_id', + :'tags' => :'tags', + :'tests' => :'tests', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'message' => :'String', + :'monitor_id' => :'Integer', + :'name' => :'String', + :'options' => :'SyntheticsSuiteOptions', + :'public_id' => :'String', + :'tags' => :'Array', + :'tests' => :'Array', + :'type' => :'SyntheticsSuiteType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuite` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'monitor_id') + self.monitor_id = attributes[:'monitor_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'public_id') + self.public_id = attributes[:'public_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'tests') + if (value = attributes[:'tests']).is_a?(Array) + self.tests = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @options.nil? + return false if @tests.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param options [Object] Object to be assigned + # @!visibility private + def options=(options) + if options.nil? + fail ArgumentError, 'invalid value for "options", options cannot be nil.' + end + @options = options + end + + # Custom attribute writer method with validation + # @param tests [Object] Object to be assigned + # @!visibility private + def tests=(tests) + if tests.nil? + fail ArgumentError, 'invalid value for "tests", tests cannot be nil.' + end + @tests = tests + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + message == o.message && + monitor_id == o.monitor_id && + name == o.name && + options == o.options && + public_id == o.public_id && + tags == o.tags && + tests == o.tests && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [message, monitor_id, name, options, public_id, tags, tests, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_options.rb b/lib/datadog_api_client/v2/models/synthetics_suite_options.rb new file mode 100644 index 000000000000..fb30130c42e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_options.rb @@ -0,0 +1,127 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Object describing the extra options for a Synthetic suite. + class SyntheticsSuiteOptions + include BaseGenericModel + + # Percentage of critical tests failure needed for a suite to fail. + attr_reader :alerting_threshold + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'alerting_threshold' => :'alerting_threshold' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'alerting_threshold' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteOptions` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'alerting_threshold') + self.alerting_threshold = attributes[:'alerting_threshold'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@alerting_threshold.nil? && @alerting_threshold > 1 + return false if !@alerting_threshold.nil? && @alerting_threshold < 0 + true + end + + # Custom attribute writer method with validation + # @param alerting_threshold [Object] Object to be assigned + # @!visibility private + def alerting_threshold=(alerting_threshold) + if !alerting_threshold.nil? && alerting_threshold > 1 + fail ArgumentError, 'invalid value for "alerting_threshold", must be smaller than or equal to 1.' + end + if !alerting_threshold.nil? && alerting_threshold < 0 + fail ArgumentError, 'invalid value for "alerting_threshold", must be greater than or equal to 0.' + end + @alerting_threshold = alerting_threshold + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + alerting_threshold == o.alerting_threshold && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [alerting_threshold, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb b/lib/datadog_api_client/v2/models/synthetics_suite_response.rb similarity index 77% rename from lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb rename to lib/datadog_api_client/v2/models/synthetics_suite_response.rb index 15545aed3c6e..08fcd2e90ad4 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb +++ b/lib/datadog_api_client/v2/models/synthetics_suite_response.rb @@ -17,24 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # Response object containing the available suppression rules with pagination metadata. - class SecurityMonitoringPaginatedSuppressionsResponse + # Synthetics suite response + class SyntheticsSuiteResponse include BaseGenericModel - # A list of suppressions objects. + # Synthetics suite response data attr_accessor :data - # Metadata for the suppression list response. - attr_accessor :meta - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'data' => :'data', - :'meta' => :'meta' + :'data' => :'data' } end @@ -42,8 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array', - :'meta' => :'SecurityMonitoringSuppressionsMeta' + :'data' => :'SyntheticsSuiteResponseData' } end @@ -52,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringPaginatedSuppressionsResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteResponse` initialize method" end self.additional_properties = {} @@ -66,13 +61,7 @@ def initialize(attributes = {}) } if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] + self.data = attributes[:'data'] end end @@ -103,7 +92,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data && - meta == o.meta && additional_properties == o.additional_properties end @@ -111,7 +99,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, meta, additional_properties].hash + [data, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_response_data.rb b/lib/datadog_api_client/v2/models/synthetics_suite_response_data.rb new file mode 100644 index 000000000000..28d224cb10c4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_response_data.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Synthetics suite response data + class SyntheticsSuiteResponseData + include BaseGenericModel + + # Object containing details about a Synthetic suite. + attr_accessor :attributes + + # The public ID for the suite. + attr_accessor :id + + # Type for the Synthetics suites responses, `suites`. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsSuite', + :'id' => :'String', + :'type' => :'SyntheticsSuiteTypes' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_search_response.rb b/lib/datadog_api_client/v2/models/synthetics_suite_search_response.rb new file mode 100644 index 000000000000..db350d677588 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_search_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Synthetics suite search response + class SyntheticsSuiteSearchResponse + include BaseGenericModel + + # Synthetics suite search response data + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SyntheticsSuiteSearchResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteSearchResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data.rb b/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data.rb new file mode 100644 index 000000000000..b478b580e70b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Synthetics suite search response data + class SyntheticsSuiteSearchResponseData + include BaseGenericModel + + # Synthetics suite search response data attributes + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsSuiteSearchResponseDataAttributes', + :'id' => :'UUID', + :'type' => :'SuiteSearchResponseType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteSearchResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data_attributes.rb b/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data_attributes.rb new file mode 100644 index 000000000000..2130ec1ed169 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_search_response_data_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Synthetics suite search response data attributes + class SyntheticsSuiteSearchResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :suites + + # + attr_reader :total + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'suites' => :'suites', + :'total' => :'total' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'suites' => :'Array', + :'total' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteSearchResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'suites') + if (value = attributes[:'suites']).is_a?(Array) + self.suites = value + end + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@total.nil? && @total > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param total [Object] Object to be assigned + # @!visibility private + def total=(total) + if !total.nil? && total > 2147483647 + fail ArgumentError, 'invalid value for "total", must be smaller than or equal to 2147483647.' + end + @total = total + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suites == o.suites && + total == o.total && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [suites, total, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_test.rb b/lib/datadog_api_client/v2/models/synthetics_suite_test.rb new file mode 100644 index 000000000000..372b0c26d498 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_test.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Object containing details about a Synthetic test included in a Synthetic suite. + class SyntheticsSuiteTest + include BaseGenericModel + + # Alerting criticality for each the test. + attr_accessor :alerting_criticality + + # + attr_reader :public_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'alerting_criticality' => :'alerting_criticality', + :'public_id' => :'public_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'alerting_criticality' => :'SyntheticsSuiteTestAlertingCriticality', + :'public_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsSuiteTest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'alerting_criticality') + self.alerting_criticality = attributes[:'alerting_criticality'] + end + + if attributes.key?(:'public_id') + self.public_id = attributes[:'public_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @public_id.nil? + true + end + + # Custom attribute writer method with validation + # @param public_id [Object] Object to be assigned + # @!visibility private + def public_id=(public_id) + if public_id.nil? + fail ArgumentError, 'invalid value for "public_id", public_id cannot be nil.' + end + @public_id = public_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + alerting_criticality == o.alerting_criticality && + public_id == o.public_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [alerting_criticality, public_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_test_alerting_criticality.rb b/lib/datadog_api_client/v2/models/synthetics_suite_test_alerting_criticality.rb new file mode 100644 index 000000000000..af10c49c6560 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_test_alerting_criticality.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Alerting criticality for each the test. + class SyntheticsSuiteTestAlertingCriticality + include BaseEnumModel + + IGNORE = "ignore".freeze + CRITICAL = "critical".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_type.rb b/lib/datadog_api_client/v2/models/synthetics_suite_type.rb new file mode 100644 index 000000000000..32aa8938c76e --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the Synthetic suite, `suite`. + class SyntheticsSuiteType + include BaseEnumModel + + SUITE = "suite".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_suite_types.rb b/lib/datadog_api_client/v2/models/synthetics_suite_types.rb new file mode 100644 index 000000000000..fd8e9824a6c2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_suite_types.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type for the Synthetics suites responses, `suites`. + class SyntheticsSuiteTypes + include BaseEnumModel + + SUITES = "suites".freeze + end +end