From f8845203c5825f77d9a5bb1144b07c743e078393 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 20 Jan 2026 09:52:50 +0000 Subject: [PATCH] Regenerate client from commit fd2046a of spec repo --- .generator/schemas/v2/openapi.yaml | 534 ++++++++++-- .../ListSecurityMonitoringSuppressions.java | 4 +- ...rityMonitoringSuppressions_1315707136.java | 37 - ...rityMonitoringSuppressions_1741429096.java | 37 - ...rityMonitoringSuppressions_3985905558.java | 37 - .../v2/synthetics/CreateSyntheticsSuite.java | 44 + .../v2/synthetics/DeleteSyntheticsSuites.java | 38 + .../v2/synthetics/EditSyntheticsSuite.java | 52 ++ .../v2/synthetics/GetSyntheticsSuite.java | 24 + examples/v2/synthetics/SearchSuites.java | 24 + .../client/v2/api/SecurityMonitoringApi.java | 84 +- .../api/client/v2/api/SyntheticsApi.java | 786 ++++++++++++++++++ .../v2/model/DeletedSuiteResponseData.java | 196 +++++ .../DeletedSuiteResponseDataAttributes.java | 166 ++++ .../v2/model/DeletedSuitesRequestDelete.java | 207 +++++ .../DeletedSuitesRequestDeleteAttributes.java | 186 +++++ .../DeletedSuitesRequestDeleteRequest.java | 147 ++++ .../v2/model/DeletedSuitesRequestType.java | 57 ++ ...sponse.java => DeletedSuitesResponse.java} | 74 +- .../SecurityMonitoringSuppressionSort.java | 87 -- .../api/client/v2/model/SuiteCreateEdit.java | 177 ++++ .../v2/model/SuiteCreateEditRequest.java | 145 ++++ .../v2/model/SuiteSearchResponseType.java | 57 ++ .../api/client/v2/model/SyntheticsSuite.java | 346 ++++++++ .../v2/model/SyntheticsSuiteOptions.java | 135 +++ .../v2/model/SyntheticsSuiteResponse.java | 136 +++ .../v2/model/SyntheticsSuiteResponseData.java | 188 +++++ ...ava => SyntheticsSuiteSearchResponse.java} | 49 +- ...=> SyntheticsSuiteSearchResponseData.java} | 111 +-- ...ticsSuiteSearchResponseDataAttributes.java | 182 ++++ .../client/v2/model/SyntheticsSuiteTest.java | 179 ++++ ...yntheticsSuiteTestAlertingCriticality.java | 65 ++ .../client/v2/model/SyntheticsSuiteType.java | 54 ++ .../client/v2/model/SyntheticsSuiteTypes.java | 54 ++ ...uppression_rule_returns_OK_response.freeze | 2 +- ..._suppression_rule_returns_OK_response.json | 16 +- ...uppression_rule_returns_OK_response.freeze | 2 +- ..._suppression_rule_returns_OK_response.json | 16 +- ...version_history_returns_OK_response.freeze | 2 +- ...s_version_history_returns_OK_response.json | 16 +- ...returns_OK_response_with_pagination.freeze | 1 - ...s_returns_OK_response_with_pagination.json | 141 ---- ...rns_OK_response_with_sort_ascending.freeze | 1 - ...turns_OK_response_with_sort_ascending.json | 138 --- ...ns_OK_response_with_sort_descending.freeze | 1 - ...urns_OK_response_with_sort_descending.json | 138 --- ...nthetics_suites_returns_OK_response.freeze | 1 + ...Synthetics_suites_returns_OK_response.json | 28 + ...te_a_test_suite_returns_OK_response.freeze | 1 + ...eate_a_test_suite_returns_OK_response.json | 62 ++ ...uppression_rule_returns_OK_response.freeze | 2 +- ..._suppression_rule_returns_OK_response.json | 16 +- .../com/datadog/api/client/v2/api/given.json | 14 +- .../client/v2/api/security_monitoring.feature | 34 - .../api/client/v2/api/synthetics.feature | 70 ++ .../com/datadog/api/client/v2/api/undo.json | 37 + 56 files changed, 4453 insertions(+), 985 deletions(-) delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.java delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.java delete mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.java create mode 100644 examples/v2/synthetics/CreateSyntheticsSuite.java create mode 100644 examples/v2/synthetics/DeleteSyntheticsSuites.java create mode 100644 examples/v2/synthetics/EditSyntheticsSuite.java create mode 100644 examples/v2/synthetics/GetSyntheticsSuite.java create mode 100644 examples/v2/synthetics/SearchSuites.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java rename src/main/java/com/datadog/api/client/v2/model/{SecurityMonitoringPaginatedSuppressionsResponse.java => DeletedSuitesResponse.java} (58%) delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionSort.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java rename src/main/java/com/datadog/api/client/v2/model/{SecurityMonitoringSuppressionsMeta.java => SyntheticsSuiteSearchResponse.java} (68%) rename src/main/java/com/datadog/api/client/v2/model/{SecurityMonitoringSuppressionsPageMeta.java => SyntheticsSuiteSearchResponseData.java} (55%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.json create mode 100644 src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 128bce58baa..86e8fca18b9 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: @@ -49256,18 +49320,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: @@ -51417,31 +51469,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`. @@ -51537,31 +51564,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: @@ -55245,6 +55247,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: @@ -55428,6 +55455,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: @@ -85732,29 +85902,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' @@ -88718,6 +88871,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/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.java b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.java index bd2a014139c..d83a0c4256c 100644 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.java +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.java @@ -3,7 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionsResponse; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - SecurityMonitoringPaginatedSuppressionsResponse result = + SecurityMonitoringSuppressionsResponse result = apiInstance.listSecurityMonitoringSuppressions(); System.out.println(result); } catch (ApiException e) { diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.java b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.java deleted file mode 100644 index 55634f1821c..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.java +++ /dev/null @@ -1,37 +0,0 @@ -// Get all suppression rules returns "OK" response with sort ascending - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListSecurityMonitoringSuppressionsOptionalParameters; -import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionSort; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - - // there is a valid "suppression" in the system - String SUPPRESSION_DATA_ID = System.getenv("SUPPRESSION_DATA_ID"); - - // there is a valid "suppression2" in the system - String SUPPRESSION2_DATA_ID = System.getenv("SUPPRESSION2_DATA_ID"); - - try { - SecurityMonitoringPaginatedSuppressionsResponse result = - apiInstance.listSecurityMonitoringSuppressions( - new ListSecurityMonitoringSuppressionsOptionalParameters() - .sort(SecurityMonitoringSuppressionSort.NAME) - .query("id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0")); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#listSecurityMonitoringSuppressions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.java b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.java deleted file mode 100644 index 4e032ff32af..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.java +++ /dev/null @@ -1,37 +0,0 @@ -// Get all suppression rules returns "OK" response with sort descending - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListSecurityMonitoringSuppressionsOptionalParameters; -import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionSort; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - - // there is a valid "suppression" in the system - String SUPPRESSION_DATA_ID = System.getenv("SUPPRESSION_DATA_ID"); - - // there is a valid "suppression2" in the system - String SUPPRESSION2_DATA_ID = System.getenv("SUPPRESSION2_DATA_ID"); - - try { - SecurityMonitoringPaginatedSuppressionsResponse result = - apiInstance.listSecurityMonitoringSuppressions( - new ListSecurityMonitoringSuppressionsOptionalParameters() - .sort(SecurityMonitoringSuppressionSort.NAME_DESCENDING) - .query("id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0")); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#listSecurityMonitoringSuppressions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.java b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.java deleted file mode 100644 index 64a631b2c19..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.java +++ /dev/null @@ -1,37 +0,0 @@ -// Get all suppression rules returns "OK" response with pagination - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListSecurityMonitoringSuppressionsOptionalParameters; -import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - - // there is a valid "suppression" in the system - String SUPPRESSION_DATA_ID = System.getenv("SUPPRESSION_DATA_ID"); - - // there is a valid "suppression2" in the system - String SUPPRESSION2_DATA_ID = System.getenv("SUPPRESSION2_DATA_ID"); - - try { - SecurityMonitoringPaginatedSuppressionsResponse result = - apiInstance.listSecurityMonitoringSuppressions( - new ListSecurityMonitoringSuppressionsOptionalParameters() - .pageSize(1L) - .pageNumber(0L) - .query("id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0")); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#listSecurityMonitoringSuppressions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.java b/examples/v2/synthetics/CreateSyntheticsSuite.java new file mode 100644 index 00000000000..a09cfeb589d --- /dev/null +++ b/examples/v2/synthetics/CreateSyntheticsSuite.java @@ -0,0 +1,44 @@ +// Synthetics: Create a test suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SuiteCreateEdit; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuite; +import com.datadog.api.client.v2.model.SyntheticsSuiteOptions; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteType; +import com.datadog.api.client.v2.model.SyntheticsSuiteTypes; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + SuiteCreateEditRequest body = + new SuiteCreateEditRequest() + .data( + new SuiteCreateEdit() + .attributes( + new SyntheticsSuite() + .message("Notification message") + .name("Example suite name") + .options(new SyntheticsSuiteOptions()) + .tags(Collections.singletonList("env:production")) + .type(SyntheticsSuiteType.SUITE)) + .type(SyntheticsSuiteTypes.SUITES)); + + try { + SyntheticsSuiteResponse result = apiInstance.createSyntheticsSuite(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#createSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/DeleteSyntheticsSuites.java b/examples/v2/synthetics/DeleteSyntheticsSuites.java new file mode 100644 index 00000000000..1b4089317bd --- /dev/null +++ b/examples/v2/synthetics/DeleteSyntheticsSuites.java @@ -0,0 +1,38 @@ +// Synthetics: Bulk delete suites returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDelete; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteAttributes; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteRequest; +import com.datadog.api.client.v2.model.DeletedSuitesRequestType; +import com.datadog.api.client.v2.model.DeletedSuitesResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + DeletedSuitesRequestDeleteRequest body = + new DeletedSuitesRequestDeleteRequest() + .data( + new DeletedSuitesRequestDelete() + .attributes( + new DeletedSuitesRequestDeleteAttributes() + .publicIds(Collections.singletonList(""))) + .type(DeletedSuitesRequestType.DELETE_SUITES_REQUEST)); + + try { + DeletedSuitesResponse result = apiInstance.deleteSyntheticsSuites(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#deleteSyntheticsSuites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/EditSyntheticsSuite.java b/examples/v2/synthetics/EditSyntheticsSuite.java new file mode 100644 index 00000000000..71821ec6670 --- /dev/null +++ b/examples/v2/synthetics/EditSyntheticsSuite.java @@ -0,0 +1,52 @@ +// Synthetics: Edit a test suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SuiteCreateEdit; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuite; +import com.datadog.api.client.v2.model.SyntheticsSuiteOptions; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteTest; +import com.datadog.api.client.v2.model.SyntheticsSuiteTestAlertingCriticality; +import com.datadog.api.client.v2.model.SyntheticsSuiteType; +import com.datadog.api.client.v2.model.SyntheticsSuiteTypes; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + SuiteCreateEditRequest body = + new SuiteCreateEditRequest() + .data( + new SuiteCreateEdit() + .attributes( + new SyntheticsSuite() + .message("Notification message") + .name("Example suite name") + .options(new SyntheticsSuiteOptions()) + .tags(Collections.singletonList("env:production")) + .tests( + Collections.singletonList( + new SyntheticsSuiteTest() + .alertingCriticality( + SyntheticsSuiteTestAlertingCriticality.CRITICAL) + .publicId(""))) + .type(SyntheticsSuiteType.SUITE)) + .type(SyntheticsSuiteTypes.SUITES)); + + try { + SyntheticsSuiteResponse result = apiInstance.editSyntheticsSuite("public_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#editSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/GetSyntheticsSuite.java b/examples/v2/synthetics/GetSyntheticsSuite.java new file mode 100644 index 00000000000..f86901b6449 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsSuite.java @@ -0,0 +1,24 @@ +// Synthetics: Get a suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + try { + SyntheticsSuiteResponse result = apiInstance.getSyntheticsSuite("public_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#getSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/SearchSuites.java b/examples/v2/synthetics/SearchSuites.java new file mode 100644 index 00000000000..60a2bd8f983 --- /dev/null +++ b/examples/v2/synthetics/SearchSuites.java @@ -0,0 +1,24 @@ +// Search Synthetics suites returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SyntheticsSuiteSearchResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + try { + SyntheticsSuiteSearchResponse result = apiInstance.searchSuites(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#searchSuites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 1da16233289..20a964e4ec4 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -62,7 +62,6 @@ import com.datadog.api.client.v2.model.SecurityMonitoringCriticalAssetUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringCriticalAssetsResponse; import com.datadog.api.client.v2.model.SecurityMonitoringListRulesResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleConvertPayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleConvertResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; @@ -83,7 +82,6 @@ import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionCreateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionSort; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionsResponse; import com.datadog.api.client.v2.model.ThreatHuntingJobResponse; @@ -10545,9 +10543,6 @@ public PaginationIterable listSecurityMonitoringSignal /** Manage optional parameters to listSecurityMonitoringSuppressions. */ public static class ListSecurityMonitoringSuppressionsOptionalParameters { private String query; - private SecurityMonitoringSuppressionSort sort; - private Long pageSize; - private Long pageNumber; /** * Set query. @@ -10559,42 +10554,6 @@ public ListSecurityMonitoringSuppressionsOptionalParameters query(String query) this.query = query; return this; } - - /** - * Set sort. - * - * @param sort Attribute used to sort the list of suppression rules. Prefix with - - * to sort in descending order. (optional) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters sort( - SecurityMonitoringSuppressionSort sort) { - this.sort = sort; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. Use -1 to return all items. (optional, - * default to -1) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } } /** @@ -10602,10 +10561,10 @@ public ListSecurityMonitoringSuppressionsOptionalParameters pageNumber(Long page * *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. * - * @return SecurityMonitoringPaginatedSuppressionsResponse + * @return SecurityMonitoringSuppressionsResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions() + public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions() throws ApiException { return listSecurityMonitoringSuppressionsWithHttpInfo( new ListSecurityMonitoringSuppressionsOptionalParameters()) @@ -10617,9 +10576,9 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup * *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> + * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> */ - public CompletableFuture + public CompletableFuture listSecurityMonitoringSuppressionsAsync() { return listSecurityMonitoringSuppressionsWithHttpInfoAsync( new ListSecurityMonitoringSuppressionsOptionalParameters()) @@ -10635,10 +10594,10 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SecurityMonitoringPaginatedSuppressionsResponse + * @return SecurityMonitoringSuppressionsResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions( + public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions( ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { return listSecurityMonitoringSuppressionsWithHttpInfo(parameters).getData(); } @@ -10649,9 +10608,9 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> + * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> */ - public CompletableFuture + public CompletableFuture listSecurityMonitoringSuppressionsAsync( ListSecurityMonitoringSuppressionsOptionalParameters parameters) { return listSecurityMonitoringSuppressionsWithHttpInfoAsync(parameters) @@ -10665,7 +10624,7 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup * Get the list of all suppression rules. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse> + * @return ApiResponse<SecurityMonitoringSuppressionsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10676,14 +10635,11 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup * *
429 Too many requests -
*/ - public ApiResponse + public ApiResponse listSecurityMonitoringSuppressionsWithHttpInfo( ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String query = parameters.query; - SecurityMonitoringSuppressionSort sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; @@ -10691,9 +10647,6 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder = apiClient.createBuilder( @@ -10712,7 +10665,7 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -10721,17 +10674,13 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> */ - public CompletableFuture> + public CompletableFuture> listSecurityMonitoringSuppressionsWithHttpInfoAsync( ListSecurityMonitoringSuppressionsOptionalParameters parameters) { Object localVarPostBody = null; String query = parameters.query; - SecurityMonitoringSuppressionSort sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; @@ -10739,9 +10688,6 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder; try { @@ -10755,7 +10701,7 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -10768,7 +10714,7 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listThreatHuntingJobs. */ diff --git a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java index 474f3ad7f24..78f8b4e8602 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java @@ -4,14 +4,20 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteRequest; +import com.datadog.api.client.v2.model.DeletedSuitesResponse; import com.datadog.api.client.v2.model.GlobalVariableJsonPatchRequest; import com.datadog.api.client.v2.model.GlobalVariableResponse; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteSearchResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -46,6 +52,419 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfo}. + * + * @param body (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse createSyntheticsSuite(SuiteCreateEditRequest body) + throws ApiException { + return createSyntheticsSuiteWithHttpInfo(body).getData(); + } + + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture createSyntheticsSuiteAsync( + SuiteCreateEditRequest body) { + return createSyntheticsSuiteWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param body (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse createSyntheticsSuiteWithHttpInfo( + SuiteCreateEditRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createSyntheticsSuite"); + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.createSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + createSyntheticsSuiteWithHttpInfoAsync(SuiteCreateEditRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.createSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfo}. + * + * @param body (required) + * @return DeletedSuitesResponse + * @throws ApiException if fails to make API call + */ + public DeletedSuitesResponse deleteSyntheticsSuites(DeletedSuitesRequestDeleteRequest body) + throws ApiException { + return deleteSyntheticsSuitesWithHttpInfo(body).getData(); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DeletedSuitesResponse> + */ + public CompletableFuture deleteSyntheticsSuitesAsync( + DeletedSuitesRequestDeleteRequest body) { + return deleteSyntheticsSuitesWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param body (required) + * @return ApiResponse<DeletedSuitesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse deleteSyntheticsSuitesWithHttpInfo( + DeletedSuitesRequestDeleteRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling deleteSyntheticsSuites"); + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/bulk-delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.deleteSyntheticsSuites", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DeletedSuitesResponse>> + */ + public CompletableFuture> + deleteSyntheticsSuitesWithHttpInfoAsync(DeletedSuitesRequestDeleteRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling deleteSyntheticsSuites")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/bulk-delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.deleteSyntheticsSuites", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse editSyntheticsSuite(String publicId, SuiteCreateEditRequest body) + throws ApiException { + return editSyntheticsSuiteWithHttpInfo(publicId, body).getData(); + } + + /** + * Synthetics: Edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfoAsync}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture editSyntheticsSuiteAsync( + String publicId, SuiteCreateEditRequest body) { + return editSyntheticsSuiteWithHttpInfoAsync(publicId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse editSyntheticsSuiteWithHttpInfo( + String publicId, SuiteCreateEditRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + throw new ApiException( + 400, "Missing the required parameter 'publicId' when calling editSyntheticsSuite"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling editSyntheticsSuite"); + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.editSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + editSyntheticsSuiteWithHttpInfoAsync(String publicId, SuiteCreateEditRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'publicId' when calling editSyntheticsSuite")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling editSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.editSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get the on-demand concurrency cap. * @@ -157,6 +576,138 @@ public ApiResponse getOnDemandConcurrencyCapWith new GenericType() {}); } + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse getSyntheticsSuite(String publicId) throws ApiException { + return getSyntheticsSuiteWithHttpInfo(publicId).getData(); + } + + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfoAsync}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture getSyntheticsSuiteAsync(String publicId) { + return getSyntheticsSuiteWithHttpInfoAsync(publicId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param publicId The public ID of the suite to get details from. (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 API error response. -
429 Too many requests -
+ */ + public ApiResponse getSyntheticsSuiteWithHttpInfo(String publicId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + throw new ApiException( + 400, "Missing the required parameter 'publicId' when calling getSyntheticsSuite"); + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.getSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + getSyntheticsSuiteWithHttpInfoAsync(String publicId) { + Object localVarPostBody = null; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'publicId' when calling getSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.getSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Patch a global variable. * @@ -322,6 +873,241 @@ public ApiResponse patchGlobalVariableWithHttpInfo( new GenericType() {}); } + /** Manage optional parameters to searchSuites. */ + public static class SearchSuitesOptionalParameters { + private String query; + private String sort; + private Boolean facetsOnly; + private Long start; + private Long count; + + /** + * Set query. + * + * @param query The search query. (optional) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set sort. + * + * @param sort The sort order for the results (e.g., name,asc or name,desc + * ). (optional, default to "name,asc") + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set facetsOnly. + * + * @param facetsOnly If true, return only facets instead of full test details. (optional, + * default to false) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters facetsOnly(Boolean facetsOnly) { + this.facetsOnly = facetsOnly; + return this; + } + + /** + * Set start. + * + * @param start The offset from which to start returning results. (optional, default to 0) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters start(Long start) { + this.start = start; + return this; + } + + /** + * Set count. + * + * @param count The maximum number of results to return. (optional, default to 50) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters count(Long count) { + this.count = count; + return this; + } + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @return SyntheticsSuiteSearchResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteSearchResponse searchSuites() throws ApiException { + return searchSuitesWithHttpInfo(new SearchSuitesOptionalParameters()).getData(); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfoAsync}. + * + * @return CompletableFuture<SyntheticsSuiteSearchResponse> + */ + public CompletableFuture searchSuitesAsync() { + return searchSuitesWithHttpInfoAsync(new SearchSuitesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SyntheticsSuiteSearchResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteSearchResponse searchSuites(SearchSuitesOptionalParameters parameters) + throws ApiException { + return searchSuitesWithHttpInfo(parameters).getData(); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SyntheticsSuiteSearchResponse> + */ + public CompletableFuture searchSuitesAsync( + SearchSuitesOptionalParameters parameters) { + return searchSuitesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for Synthetics suites. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SyntheticsSuiteSearchResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse searchSuitesWithHttpInfo( + SearchSuitesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String query = parameters.query; + String sort = parameters.sort; + Boolean facetsOnly = parameters.facetsOnly; + Long start = parameters.start; + Long count = parameters.count; + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facets_only", facetsOnly)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.searchSuites", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SyntheticsSuiteSearchResponse>> + */ + public CompletableFuture> + searchSuitesWithHttpInfoAsync(SearchSuitesOptionalParameters parameters) { + Object localVarPostBody = null; + String query = parameters.query; + String sort = parameters.sort; + Boolean facetsOnly = parameters.facetsOnly; + Long start = parameters.start; + Long count = parameters.count; + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facets_only", facetsOnly)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.searchSuites", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Save new value for on-demand concurrency cap. * diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java new file mode 100644 index 00000000000..ce7bc7dc4ae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java @@ -0,0 +1,196 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuiteResponseData.JSON_PROPERTY_ATTRIBUTES, + DeletedSuiteResponseData.JSON_PROPERTY_ID, + DeletedSuiteResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuiteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DeletedSuiteResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteTypes type = SyntheticsSuiteTypes.SUITES; + + public DeletedSuiteResponseData attributes(DeletedSuiteResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeletedSuiteResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DeletedSuiteResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public DeletedSuiteResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DeletedSuiteResponseData type(SyntheticsSuiteTypes type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type for the Synthetics suites responses, suites. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteTypes getType() { + return type; + } + + public void setType(SyntheticsSuiteTypes type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuiteResponseData + */ + @JsonAnySetter + public DeletedSuiteResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuiteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuiteResponseData deletedSuiteResponseData = (DeletedSuiteResponseData) o; + return Objects.equals(this.attributes, deletedSuiteResponseData.attributes) + && Objects.equals(this.id, deletedSuiteResponseData.id) + && Objects.equals(this.type, deletedSuiteResponseData.type) + && Objects.equals(this.additionalProperties, deletedSuiteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuiteResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java new file mode 100644 index 00000000000..5e99299cc43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java @@ -0,0 +1,166 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuiteResponseDataAttributes.JSON_PROPERTY_DELETED_AT, + DeletedSuiteResponseDataAttributes.JSON_PROPERTY_PUBLIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuiteResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private String deletedAt; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public DeletedSuiteResponseDataAttributes deletedAt(String deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + /** + * Deletion timestamp of the Synthetic suite ID. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeletedAt() { + return deletedAt; + } + + public void setDeletedAt(String deletedAt) { + this.deletedAt = deletedAt; + } + + public DeletedSuiteResponseDataAttributes publicId(String publicId) { + this.publicId = publicId; + return this; + } + + /** + * The Synthetic suite ID deleted. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuiteResponseDataAttributes + */ + @JsonAnySetter + public DeletedSuiteResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuiteResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuiteResponseDataAttributes deletedSuiteResponseDataAttributes = + (DeletedSuiteResponseDataAttributes) o; + return Objects.equals(this.deletedAt, deletedSuiteResponseDataAttributes.deletedAt) + && Objects.equals(this.publicId, deletedSuiteResponseDataAttributes.publicId) + && Objects.equals( + this.additionalProperties, deletedSuiteResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deletedAt, publicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuiteResponseDataAttributes {\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java new file mode 100644 index 00000000000..75a316e6928 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java @@ -0,0 +1,207 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuitesRequestDelete.JSON_PROPERTY_ATTRIBUTES, + DeletedSuitesRequestDelete.JSON_PROPERTY_ID, + DeletedSuitesRequestDelete.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDelete { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DeletedSuitesRequestDeleteAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DeletedSuitesRequestType type = DeletedSuitesRequestType.DELETE_SUITES_REQUEST; + + public DeletedSuitesRequestDelete() {} + + @JsonCreator + public DeletedSuitesRequestDelete( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public DeletedSuitesRequestDelete attributes(DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeletedSuitesRequestDeleteAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + } + + public DeletedSuitesRequestDelete id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DeletedSuitesRequestDelete type(DeletedSuitesRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeletedSuitesRequestType getType() { + return type; + } + + public void setType(DeletedSuitesRequestType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDelete + */ + @JsonAnySetter + public DeletedSuitesRequestDelete putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDelete object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDelete deletedSuitesRequestDelete = (DeletedSuitesRequestDelete) o; + return Objects.equals(this.attributes, deletedSuitesRequestDelete.attributes) + && Objects.equals(this.id, deletedSuitesRequestDelete.id) + && Objects.equals(this.type, deletedSuitesRequestDelete.type) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDelete.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDelete {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java new file mode 100644 index 00000000000..779a3f44cde --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java @@ -0,0 +1,186 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuitesRequestDeleteAttributes.JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES, + DeletedSuitesRequestDeleteAttributes.JSON_PROPERTY_PUBLIC_IDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDeleteAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES = "force_delete_dependencies"; + private Boolean forceDeleteDependencies; + + public static final String JSON_PROPERTY_PUBLIC_IDS = "public_ids"; + private List publicIds = new ArrayList<>(); + + public DeletedSuitesRequestDeleteAttributes() {} + + @JsonCreator + public DeletedSuitesRequestDeleteAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_IDS) List publicIds) { + this.publicIds = publicIds; + } + + public DeletedSuitesRequestDeleteAttributes forceDeleteDependencies( + Boolean forceDeleteDependencies) { + this.forceDeleteDependencies = forceDeleteDependencies; + return this; + } + + /** + * GetforceDeleteDependencies + * + * @return forceDeleteDependencies + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getForceDeleteDependencies() { + return forceDeleteDependencies; + } + + public void setForceDeleteDependencies(Boolean forceDeleteDependencies) { + this.forceDeleteDependencies = forceDeleteDependencies; + } + + public DeletedSuitesRequestDeleteAttributes publicIds(List publicIds) { + this.publicIds = publicIds; + return this; + } + + public DeletedSuitesRequestDeleteAttributes addPublicIdsItem(String publicIdsItem) { + this.publicIds.add(publicIdsItem); + return this; + } + + /** + * GetpublicIds + * + * @return publicIds + */ + @JsonProperty(JSON_PROPERTY_PUBLIC_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPublicIds() { + return publicIds; + } + + public void setPublicIds(List publicIds) { + this.publicIds = publicIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDeleteAttributes + */ + @JsonAnySetter + public DeletedSuitesRequestDeleteAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDeleteAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDeleteAttributes deletedSuitesRequestDeleteAttributes = + (DeletedSuitesRequestDeleteAttributes) o; + return Objects.equals( + this.forceDeleteDependencies, + deletedSuitesRequestDeleteAttributes.forceDeleteDependencies) + && Objects.equals(this.publicIds, deletedSuitesRequestDeleteAttributes.publicIds) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDeleteAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(forceDeleteDependencies, publicIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDeleteAttributes {\n"); + sb.append(" forceDeleteDependencies: ") + .append(toIndentedString(forceDeleteDependencies)) + .append("\n"); + sb.append(" publicIds: ").append(toIndentedString(publicIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java new file mode 100644 index 00000000000..331ff9be80d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java @@ -0,0 +1,147 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({DeletedSuitesRequestDeleteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDeleteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DeletedSuitesRequestDelete data; + + public DeletedSuitesRequestDeleteRequest() {} + + @JsonCreator + public DeletedSuitesRequestDeleteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DeletedSuitesRequestDelete data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DeletedSuitesRequestDeleteRequest data(DeletedSuitesRequestDelete data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeletedSuitesRequestDelete getData() { + return data; + } + + public void setData(DeletedSuitesRequestDelete data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDeleteRequest + */ + @JsonAnySetter + public DeletedSuitesRequestDeleteRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDeleteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDeleteRequest deletedSuitesRequestDeleteRequest = + (DeletedSuitesRequestDeleteRequest) o; + return Objects.equals(this.data, deletedSuitesRequestDeleteRequest.data) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDeleteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDeleteRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java new file mode 100644 index 00000000000..90726e10043 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize(using = DeletedSuitesRequestType.DeletedSuitesRequestTypeSerializer.class) +public class DeletedSuitesRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("delete_suites_request")); + + public static final DeletedSuitesRequestType DELETE_SUITES_REQUEST = + new DeletedSuitesRequestType("delete_suites_request"); + + DeletedSuitesRequestType(String value) { + super(value, allowedValues); + } + + public static class DeletedSuitesRequestTypeSerializer + extends StdSerializer { + public DeletedSuitesRequestTypeSerializer(Class t) { + super(t); + } + + public DeletedSuitesRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DeletedSuitesRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DeletedSuitesRequestType fromValue(String value) { + return new DeletedSuitesRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java similarity index 58% rename from src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java rename to src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java index 10b5fe51cfb..c9d1de3e5ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java @@ -18,32 +18,24 @@ import java.util.Map; import java.util.Objects; -/** Response object containing the available suppression rules with pagination metadata. */ -@JsonPropertyOrder({ - SecurityMonitoringPaginatedSuppressionsResponse.JSON_PROPERTY_DATA, - SecurityMonitoringPaginatedSuppressionsResponse.JSON_PROPERTY_META -}) +/** */ +@JsonPropertyOrder({DeletedSuitesResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringPaginatedSuppressionsResponse { +public class DeletedSuitesResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; - public static final String JSON_PROPERTY_META = "meta"; - private SecurityMonitoringSuppressionsMeta meta; - - public SecurityMonitoringPaginatedSuppressionsResponse data( - List data) { + public DeletedSuitesResponse data(List data) { this.data = data; - for (SecurityMonitoringSuppression item : data) { + for (DeletedSuiteResponseData item : data) { this.unparsed |= item.unparsed; } return this; } - public SecurityMonitoringPaginatedSuppressionsResponse addDataItem( - SecurityMonitoringSuppression dataItem) { + public DeletedSuitesResponse addDataItem(DeletedSuiteResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -53,44 +45,21 @@ public SecurityMonitoringPaginatedSuppressionsResponse addDataItem( } /** - * A list of suppressions objects. + * Getdata * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } - public SecurityMonitoringPaginatedSuppressionsResponse meta( - SecurityMonitoringSuppressionsMeta meta) { - this.meta = meta; - this.unparsed |= meta.unparsed; - return this; - } - - /** - * Metadata for the suppression list response. - * - * @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSuppressionsMeta getMeta() { - return meta; - } - - public void setMeta(SecurityMonitoringSuppressionsMeta meta) { - this.meta = meta; - } - /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -103,11 +72,10 @@ public void setMeta(SecurityMonitoringSuppressionsMeta meta) { * * @param key The arbitrary key to set * @param value The associated value - * @return SecurityMonitoringPaginatedSuppressionsResponse + * @return DeletedSuitesResponse */ @JsonAnySetter - public SecurityMonitoringPaginatedSuppressionsResponse putAdditionalProperty( - String key, Object value) { + public DeletedSuitesResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -138,7 +106,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SecurityMonitoringPaginatedSuppressionsResponse object is equal to o. */ + /** Return true if this DeletedSuitesResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,27 +115,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringPaginatedSuppressionsResponse - securityMonitoringPaginatedSuppressionsResponse = - (SecurityMonitoringPaginatedSuppressionsResponse) o; - return Objects.equals(this.data, securityMonitoringPaginatedSuppressionsResponse.data) - && Objects.equals(this.meta, securityMonitoringPaginatedSuppressionsResponse.meta) - && Objects.equals( - this.additionalProperties, - securityMonitoringPaginatedSuppressionsResponse.additionalProperties); + DeletedSuitesResponse deletedSuitesResponse = (DeletedSuitesResponse) o; + return Objects.equals(this.data, deletedSuitesResponse.data) + && Objects.equals(this.additionalProperties, deletedSuitesResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, meta, additionalProperties); + return Objects.hash(data, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringPaginatedSuppressionsResponse {\n"); + sb.append("class DeletedSuitesResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionSort.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionSort.java deleted file mode 100644 index b3c61e52e32..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionSort.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** The sort parameters used for querying suppression rules. */ -@JsonSerialize( - using = SecurityMonitoringSuppressionSort.SecurityMonitoringSuppressionSortSerializer.class) -public class SecurityMonitoringSuppressionSort extends ModelEnum { - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "name", - "start_date", - "expiration_date", - "update_date", - "enabled", - "-name", - "-start_date", - "-expiration_date", - "-update_date", - "-enabled")); - - public static final SecurityMonitoringSuppressionSort NAME = - new SecurityMonitoringSuppressionSort("name"); - public static final SecurityMonitoringSuppressionSort START_DATE = - new SecurityMonitoringSuppressionSort("start_date"); - public static final SecurityMonitoringSuppressionSort EXPIRATION_DATE = - new SecurityMonitoringSuppressionSort("expiration_date"); - public static final SecurityMonitoringSuppressionSort UPDATE_DATE = - new SecurityMonitoringSuppressionSort("update_date"); - public static final SecurityMonitoringSuppressionSort ENABLED = - new SecurityMonitoringSuppressionSort("enabled"); - public static final SecurityMonitoringSuppressionSort NAME_DESCENDING = - new SecurityMonitoringSuppressionSort("-name"); - public static final SecurityMonitoringSuppressionSort START_DATE_DESCENDING = - new SecurityMonitoringSuppressionSort("-start_date"); - public static final SecurityMonitoringSuppressionSort EXPIRATION_DATE_DESCENDING = - new SecurityMonitoringSuppressionSort("-expiration_date"); - public static final SecurityMonitoringSuppressionSort UPDATE_DATE_DESCENDING = - new SecurityMonitoringSuppressionSort("-update_date"); - public static final SecurityMonitoringSuppressionSort ENABLED_DESCENDING = - new SecurityMonitoringSuppressionSort("-enabled"); - - SecurityMonitoringSuppressionSort(String value) { - super(value, allowedValues); - } - - public static class SecurityMonitoringSuppressionSortSerializer - extends StdSerializer { - public SecurityMonitoringSuppressionSortSerializer(Class t) { - super(t); - } - - public SecurityMonitoringSuppressionSortSerializer() { - this(null); - } - - @Override - public void serialize( - SecurityMonitoringSuppressionSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static SecurityMonitoringSuppressionSort fromValue(String value) { - return new SecurityMonitoringSuppressionSort(value); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java new file mode 100644 index 00000000000..6035aeb897e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java @@ -0,0 +1,177 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SuiteCreateEdit.JSON_PROPERTY_ATTRIBUTES, SuiteCreateEdit.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SuiteCreateEdit { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuite attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteTypes type = SyntheticsSuiteTypes.SUITES; + + public SuiteCreateEdit() {} + + @JsonCreator + public SuiteCreateEdit( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) SyntheticsSuite attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsSuiteTypes type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SuiteCreateEdit attributes(SyntheticsSuite attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Object containing details about a Synthetic suite. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuite getAttributes() { + return attributes; + } + + public void setAttributes(SyntheticsSuite attributes) { + this.attributes = attributes; + } + + public SuiteCreateEdit type(SyntheticsSuiteTypes type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type for the Synthetics suites responses, suites. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteTypes getType() { + return type; + } + + public void setType(SyntheticsSuiteTypes type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SuiteCreateEdit + */ + @JsonAnySetter + public SuiteCreateEdit putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SuiteCreateEdit object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuiteCreateEdit suiteCreateEdit = (SuiteCreateEdit) o; + return Objects.equals(this.attributes, suiteCreateEdit.attributes) + && Objects.equals(this.type, suiteCreateEdit.type) + && Objects.equals(this.additionalProperties, suiteCreateEdit.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuiteCreateEdit {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java new file mode 100644 index 00000000000..231a5078ee2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java @@ -0,0 +1,145 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SuiteCreateEditRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SuiteCreateEditRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SuiteCreateEdit data; + + public SuiteCreateEditRequest() {} + + @JsonCreator + public SuiteCreateEditRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SuiteCreateEdit data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SuiteCreateEditRequest data(SuiteCreateEdit data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SuiteCreateEdit getData() { + return data; + } + + public void setData(SuiteCreateEdit data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SuiteCreateEditRequest + */ + @JsonAnySetter + public SuiteCreateEditRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SuiteCreateEditRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuiteCreateEditRequest suiteCreateEditRequest = (SuiteCreateEditRequest) o; + return Objects.equals(this.data, suiteCreateEditRequest.data) + && Objects.equals(this.additionalProperties, suiteCreateEditRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuiteCreateEditRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java b/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java new file mode 100644 index 00000000000..f24f8ba8087 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize(using = SuiteSearchResponseType.SuiteSearchResponseTypeSerializer.class) +public class SuiteSearchResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("suites_search")); + + public static final SuiteSearchResponseType SUITES_SEARCH = + new SuiteSearchResponseType("suites_search"); + + SuiteSearchResponseType(String value) { + super(value, allowedValues); + } + + public static class SuiteSearchResponseTypeSerializer + extends StdSerializer { + public SuiteSearchResponseTypeSerializer(Class t) { + super(t); + } + + public SuiteSearchResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SuiteSearchResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SuiteSearchResponseType fromValue(String value) { + return new SuiteSearchResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java new file mode 100644 index 00000000000..063766f134c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java @@ -0,0 +1,346 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Object containing details about a Synthetic suite. */ +@JsonPropertyOrder({ + SyntheticsSuite.JSON_PROPERTY_MESSAGE, + SyntheticsSuite.JSON_PROPERTY_MONITOR_ID, + SyntheticsSuite.JSON_PROPERTY_NAME, + SyntheticsSuite.JSON_PROPERTY_OPTIONS, + SyntheticsSuite.JSON_PROPERTY_PUBLIC_ID, + SyntheticsSuite.JSON_PROPERTY_TAGS, + SyntheticsSuite.JSON_PROPERTY_TESTS, + SyntheticsSuite.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuite { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_MONITOR_ID = "monitor_id"; + private Long monitorId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private SyntheticsSuiteOptions options; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TESTS = "tests"; + private List tests = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteType type = SyntheticsSuiteType.SUITE; + + public SyntheticsSuite() {} + + @JsonCreator + public SyntheticsSuite( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) SyntheticsSuiteOptions options, + @JsonProperty(required = true, value = JSON_PROPERTY_TESTS) List tests, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsSuiteType type) { + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.tests = tests; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SyntheticsSuite message(String message) { + this.message = message; + return this; + } + + /** + * Notification message associated with the suite. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + /** + * The associated monitor ID. + * + * @return monitorId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorId() { + return monitorId; + } + + public SyntheticsSuite name(String name) { + this.name = name; + return this; + } + + /** + * Name of the suite. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SyntheticsSuite options(SyntheticsSuiteOptions options) { + this.options = options; + this.unparsed |= options.unparsed; + return this; + } + + /** + * Object describing the extra options for a Synthetic suite. + * + * @return options + */ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteOptions getOptions() { + return options; + } + + public void setOptions(SyntheticsSuiteOptions options) { + this.options = options; + } + + /** + * The public ID for the test. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } + + public SyntheticsSuite tags(List tags) { + this.tags = tags; + return this; + } + + public SyntheticsSuite addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Array of tags attached to the suite. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public SyntheticsSuite tests(List tests) { + this.tests = tests; + for (SyntheticsSuiteTest item : tests) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SyntheticsSuite addTestsItem(SyntheticsSuiteTest testsItem) { + this.tests.add(testsItem); + this.unparsed |= testsItem.unparsed; + return this; + } + + /** + * Gettests + * + * @return tests + */ + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTests() { + return tests; + } + + public void setTests(List tests) { + this.tests = tests; + } + + public SyntheticsSuite type(SyntheticsSuiteType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of the Synthetic suite, suite. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteType getType() { + return type; + } + + public void setType(SyntheticsSuiteType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuite + */ + @JsonAnySetter + public SyntheticsSuite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuite object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuite syntheticsSuite = (SyntheticsSuite) o; + return Objects.equals(this.message, syntheticsSuite.message) + && Objects.equals(this.monitorId, syntheticsSuite.monitorId) + && Objects.equals(this.name, syntheticsSuite.name) + && Objects.equals(this.options, syntheticsSuite.options) + && Objects.equals(this.publicId, syntheticsSuite.publicId) + && Objects.equals(this.tags, syntheticsSuite.tags) + && Objects.equals(this.tests, syntheticsSuite.tests) + && Objects.equals(this.type, syntheticsSuite.type) + && Objects.equals(this.additionalProperties, syntheticsSuite.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + message, monitorId, name, options, publicId, tags, tests, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuite {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tests: ").append(toIndentedString(tests)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java new file mode 100644 index 00000000000..6c674f3d606 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java @@ -0,0 +1,135 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Object describing the extra options for a Synthetic suite. */ +@JsonPropertyOrder({SyntheticsSuiteOptions.JSON_PROPERTY_ALERTING_THRESHOLD}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteOptions { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALERTING_THRESHOLD = "alerting_threshold"; + private Double alertingThreshold; + + public SyntheticsSuiteOptions alertingThreshold(Double alertingThreshold) { + this.alertingThreshold = alertingThreshold; + return this; + } + + /** + * Percentage of critical tests failure needed for a suite to fail. minimum: 0 maximum: 1 + * + * @return alertingThreshold + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERTING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getAlertingThreshold() { + return alertingThreshold; + } + + public void setAlertingThreshold(Double alertingThreshold) { + this.alertingThreshold = alertingThreshold; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteOptions + */ + @JsonAnySetter + public SyntheticsSuiteOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteOptions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteOptions syntheticsSuiteOptions = (SyntheticsSuiteOptions) o; + return Objects.equals(this.alertingThreshold, syntheticsSuiteOptions.alertingThreshold) + && Objects.equals(this.additionalProperties, syntheticsSuiteOptions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(alertingThreshold, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteOptions {\n"); + sb.append(" alertingThreshold: ").append(toIndentedString(alertingThreshold)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java new file mode 100644 index 00000000000..ed61b3c73d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite response */ +@JsonPropertyOrder({SyntheticsSuiteResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SyntheticsSuiteResponseData data; + + public SyntheticsSuiteResponse data(SyntheticsSuiteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Synthetics suite response data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteResponseData getData() { + return data; + } + + public void setData(SyntheticsSuiteResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteResponse + */ + @JsonAnySetter + public SyntheticsSuiteResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteResponse syntheticsSuiteResponse = (SyntheticsSuiteResponse) o; + return Objects.equals(this.data, syntheticsSuiteResponse.data) + && Objects.equals(this.additionalProperties, syntheticsSuiteResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java new file mode 100644 index 00000000000..c81bcb411c3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java @@ -0,0 +1,188 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite response data */ +@JsonPropertyOrder({ + SyntheticsSuiteResponseData.JSON_PROPERTY_ATTRIBUTES, + SyntheticsSuiteResponseData.JSON_PROPERTY_ID, + SyntheticsSuiteResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuite attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteTypes type = SyntheticsSuiteTypes.SUITES; + + public SyntheticsSuiteResponseData attributes(SyntheticsSuite attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Object containing details about a Synthetic suite. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuite getAttributes() { + return attributes; + } + + public void setAttributes(SyntheticsSuite attributes) { + this.attributes = attributes; + } + + /** + * The public ID for the suite. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public SyntheticsSuiteResponseData type(SyntheticsSuiteTypes type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type for the Synthetics suites responses, suites. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteTypes getType() { + return type; + } + + public void setType(SyntheticsSuiteTypes type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteResponseData + */ + @JsonAnySetter + public SyntheticsSuiteResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteResponseData syntheticsSuiteResponseData = (SyntheticsSuiteResponseData) o; + return Objects.equals(this.attributes, syntheticsSuiteResponseData.attributes) + && Objects.equals(this.id, syntheticsSuiteResponseData.id) + && Objects.equals(this.type, syntheticsSuiteResponseData.type) + && Objects.equals( + this.additionalProperties, syntheticsSuiteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java similarity index 68% rename from src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java rename to src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java index ff2e81ede3c..ce2831fec9d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java @@ -16,35 +16,35 @@ import java.util.Map; import java.util.Objects; -/** Metadata for the suppression list response. */ -@JsonPropertyOrder({SecurityMonitoringSuppressionsMeta.JSON_PROPERTY_PAGE}) +/** Synthetics suite search response */ +@JsonPropertyOrder({SyntheticsSuiteSearchResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringSuppressionsMeta { +public class SyntheticsSuiteSearchResponse { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_PAGE = "page"; - private SecurityMonitoringSuppressionsPageMeta page; + public static final String JSON_PROPERTY_DATA = "data"; + private SyntheticsSuiteSearchResponseData data; - public SecurityMonitoringSuppressionsMeta page(SecurityMonitoringSuppressionsPageMeta page) { - this.page = page; - this.unparsed |= page.unparsed; + public SyntheticsSuiteSearchResponse data(SyntheticsSuiteSearchResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; return this; } /** - * Pagination metadata. + * Synthetics suite search response data * - * @return page + * @return data */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) + @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSuppressionsPageMeta getPage() { - return page; + public SyntheticsSuiteSearchResponseData getData() { + return data; } - public void setPage(SecurityMonitoringSuppressionsPageMeta page) { - this.page = page; + public void setData(SyntheticsSuiteSearchResponseData data) { + this.data = data; } /** @@ -59,10 +59,10 @@ public void setPage(SecurityMonitoringSuppressionsPageMeta page) { * * @param key The arbitrary key to set * @param value The associated value - * @return SecurityMonitoringSuppressionsMeta + * @return SyntheticsSuiteSearchResponse */ @JsonAnySetter - public SecurityMonitoringSuppressionsMeta putAdditionalProperty(String key, Object value) { + public SyntheticsSuiteSearchResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SecurityMonitoringSuppressionsMeta object is equal to o. */ + /** Return true if this SyntheticsSuiteSearchResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,23 +102,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSuppressionsMeta securityMonitoringSuppressionsMeta = - (SecurityMonitoringSuppressionsMeta) o; - return Objects.equals(this.page, securityMonitoringSuppressionsMeta.page) + SyntheticsSuiteSearchResponse syntheticsSuiteSearchResponse = (SyntheticsSuiteSearchResponse) o; + return Objects.equals(this.data, syntheticsSuiteSearchResponse.data) && Objects.equals( - this.additionalProperties, securityMonitoringSuppressionsMeta.additionalProperties); + this.additionalProperties, syntheticsSuiteSearchResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(page, additionalProperties); + return Objects.hash(data, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringSuppressionsMeta {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append("class SyntheticsSuiteSearchResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java rename to src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java index 79c8a1083c3..09f21537830 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java @@ -15,87 +15,94 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.UUID; -/** Pagination metadata. */ +/** Synthetics suite search response data */ @JsonPropertyOrder({ - SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_PAGE_NUMBER, - SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_PAGE_SIZE, - SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_TOTAL_COUNT + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ATTRIBUTES, + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ID, + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringSuppressionsPageMeta { +public class SyntheticsSuiteSearchResponseData { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_PAGE_NUMBER = "pageNumber"; - private Long pageNumber; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuiteSearchResponseDataAttributes attributes; - public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; - private Long pageSize; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; - public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount"; - private Long totalCount; + public static final String JSON_PROPERTY_TYPE = "type"; + private SuiteSearchResponseType type = SuiteSearchResponseType.SUITES_SEARCH; - public SecurityMonitoringSuppressionsPageMeta pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public SyntheticsSuiteSearchResponseData attributes( + SyntheticsSuiteSearchResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; return this; } /** - * Current page number. + * Synthetics suite search response data attributes * - * @return pageNumber + * @return attributes */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE_NUMBER) + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPageNumber() { - return pageNumber; + public SyntheticsSuiteSearchResponseDataAttributes getAttributes() { + return attributes; } - public void setPageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public void setAttributes(SyntheticsSuiteSearchResponseDataAttributes attributes) { + this.attributes = attributes; } - public SecurityMonitoringSuppressionsPageMeta pageSize(Long pageSize) { - this.pageSize = pageSize; + public SyntheticsSuiteSearchResponseData id(UUID id) { + this.id = id; return this; } /** - * Current page size. + * Getid * - * @return pageSize + * @return id */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPageSize() { - return pageSize; + public UUID getId() { + return id; } - public void setPageSize(Long pageSize) { - this.pageSize = pageSize; + public void setId(UUID id) { + this.id = id; } - public SecurityMonitoringSuppressionsPageMeta totalCount(Long totalCount) { - this.totalCount = totalCount; + public SyntheticsSuiteSearchResponseData type(SuiteSearchResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * Total count of suppressions. + * Gettype * - * @return totalCount + * @return type */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; + public SuiteSearchResponseType getType() { + return type; } - public void setTotalCount(Long totalCount) { - this.totalCount = totalCount; + public void setType(SuiteSearchResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; } /** @@ -110,10 +117,10 @@ public void setTotalCount(Long totalCount) { * * @param key The arbitrary key to set * @param value The associated value - * @return SecurityMonitoringSuppressionsPageMeta + * @return SyntheticsSuiteSearchResponseData */ @JsonAnySetter - public SecurityMonitoringSuppressionsPageMeta putAdditionalProperty(String key, Object value) { + public SyntheticsSuiteSearchResponseData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -144,7 +151,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SecurityMonitoringSuppressionsPageMeta object is equal to o. */ + /** Return true if this SyntheticsSuiteSearchResponseData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,27 +160,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSuppressionsPageMeta securityMonitoringSuppressionsPageMeta = - (SecurityMonitoringSuppressionsPageMeta) o; - return Objects.equals(this.pageNumber, securityMonitoringSuppressionsPageMeta.pageNumber) - && Objects.equals(this.pageSize, securityMonitoringSuppressionsPageMeta.pageSize) - && Objects.equals(this.totalCount, securityMonitoringSuppressionsPageMeta.totalCount) + SyntheticsSuiteSearchResponseData syntheticsSuiteSearchResponseData = + (SyntheticsSuiteSearchResponseData) o; + return Objects.equals(this.attributes, syntheticsSuiteSearchResponseData.attributes) + && Objects.equals(this.id, syntheticsSuiteSearchResponseData.id) + && Objects.equals(this.type, syntheticsSuiteSearchResponseData.type) && Objects.equals( - this.additionalProperties, securityMonitoringSuppressionsPageMeta.additionalProperties); + this.additionalProperties, syntheticsSuiteSearchResponseData.additionalProperties); } @Override public int hashCode() { - return Objects.hash(pageNumber, pageSize, totalCount, additionalProperties); + return Objects.hash(attributes, id, type, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringSuppressionsPageMeta {\n"); - sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("class SyntheticsSuiteSearchResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java new file mode 100644 index 00000000000..703c5a9a63e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java @@ -0,0 +1,182 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite search response data attributes */ +@JsonPropertyOrder({ + SyntheticsSuiteSearchResponseDataAttributes.JSON_PROPERTY_SUITES, + SyntheticsSuiteSearchResponseDataAttributes.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteSearchResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SUITES = "suites"; + private List suites = null; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Integer total; + + public SyntheticsSuiteSearchResponseDataAttributes suites(List suites) { + this.suites = suites; + for (SyntheticsSuite item : suites) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SyntheticsSuiteSearchResponseDataAttributes addSuitesItem(SyntheticsSuite suitesItem) { + if (this.suites == null) { + this.suites = new ArrayList<>(); + } + this.suites.add(suitesItem); + this.unparsed |= suitesItem.unparsed; + return this; + } + + /** + * Getsuites + * + * @return suites + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUITES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSuites() { + return suites; + } + + public void setSuites(List suites) { + this.suites = suites; + } + + public SyntheticsSuiteSearchResponseDataAttributes total(Integer total) { + this.total = total; + return this; + } + + /** + * Gettotal maximum: 2147483647 + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteSearchResponseDataAttributes + */ + @JsonAnySetter + public SyntheticsSuiteSearchResponseDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteSearchResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteSearchResponseDataAttributes syntheticsSuiteSearchResponseDataAttributes = + (SyntheticsSuiteSearchResponseDataAttributes) o; + return Objects.equals(this.suites, syntheticsSuiteSearchResponseDataAttributes.suites) + && Objects.equals(this.total, syntheticsSuiteSearchResponseDataAttributes.total) + && Objects.equals( + this.additionalProperties, + syntheticsSuiteSearchResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(suites, total, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteSearchResponseDataAttributes {\n"); + sb.append(" suites: ").append(toIndentedString(suites)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java new file mode 100644 index 00000000000..053da52c187 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java @@ -0,0 +1,179 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Object containing details about a Synthetic test included in a Synthetic suite. */ +@JsonPropertyOrder({ + SyntheticsSuiteTest.JSON_PROPERTY_ALERTING_CRITICALITY, + SyntheticsSuiteTest.JSON_PROPERTY_PUBLIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteTest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALERTING_CRITICALITY = "alerting_criticality"; + private SyntheticsSuiteTestAlertingCriticality alertingCriticality; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public SyntheticsSuiteTest() {} + + @JsonCreator + public SyntheticsSuiteTest( + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_ID) String publicId) { + this.publicId = publicId; + } + + public SyntheticsSuiteTest alertingCriticality( + SyntheticsSuiteTestAlertingCriticality alertingCriticality) { + this.alertingCriticality = alertingCriticality; + this.unparsed |= !alertingCriticality.isValid(); + return this; + } + + /** + * Alerting criticality for each the test. + * + * @return alertingCriticality + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERTING_CRITICALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteTestAlertingCriticality getAlertingCriticality() { + return alertingCriticality; + } + + public void setAlertingCriticality(SyntheticsSuiteTestAlertingCriticality alertingCriticality) { + if (!alertingCriticality.isValid()) { + this.unparsed = true; + } + this.alertingCriticality = alertingCriticality; + } + + public SyntheticsSuiteTest publicId(String publicId) { + this.publicId = publicId; + return this; + } + + /** + * GetpublicId + * + * @return publicId + */ + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteTest + */ + @JsonAnySetter + public SyntheticsSuiteTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteTest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteTest syntheticsSuiteTest = (SyntheticsSuiteTest) o; + return Objects.equals(this.alertingCriticality, syntheticsSuiteTest.alertingCriticality) + && Objects.equals(this.publicId, syntheticsSuiteTest.publicId) + && Objects.equals(this.additionalProperties, syntheticsSuiteTest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(alertingCriticality, publicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteTest {\n"); + sb.append(" alertingCriticality: ") + .append(toIndentedString(alertingCriticality)) + .append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java new file mode 100644 index 00000000000..37788a87fb1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java @@ -0,0 +1,65 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Alerting criticality for each the test. */ +@JsonSerialize( + using = + SyntheticsSuiteTestAlertingCriticality.SyntheticsSuiteTestAlertingCriticalitySerializer + .class) +public class SyntheticsSuiteTestAlertingCriticality extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ignore", "critical")); + + public static final SyntheticsSuiteTestAlertingCriticality IGNORE = + new SyntheticsSuiteTestAlertingCriticality("ignore"); + public static final SyntheticsSuiteTestAlertingCriticality CRITICAL = + new SyntheticsSuiteTestAlertingCriticality("critical"); + + SyntheticsSuiteTestAlertingCriticality(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTestAlertingCriticalitySerializer + extends StdSerializer { + public SyntheticsSuiteTestAlertingCriticalitySerializer( + Class t) { + super(t); + } + + public SyntheticsSuiteTestAlertingCriticalitySerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteTestAlertingCriticality value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteTestAlertingCriticality fromValue(String value) { + return new SyntheticsSuiteTestAlertingCriticality(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java new file mode 100644 index 00000000000..562031e7507 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java @@ -0,0 +1,54 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of the Synthetic suite, suite. */ +@JsonSerialize(using = SyntheticsSuiteType.SyntheticsSuiteTypeSerializer.class) +public class SyntheticsSuiteType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("suite")); + + public static final SyntheticsSuiteType SUITE = new SyntheticsSuiteType("suite"); + + SyntheticsSuiteType(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTypeSerializer extends StdSerializer { + public SyntheticsSuiteTypeSerializer(Class t) { + super(t); + } + + public SyntheticsSuiteTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteType fromValue(String value) { + return new SyntheticsSuiteType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java new file mode 100644 index 00000000000..516e53d5aac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java @@ -0,0 +1,54 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type for the Synthetics suites responses, suites. */ +@JsonSerialize(using = SyntheticsSuiteTypes.SyntheticsSuiteTypesSerializer.class) +public class SyntheticsSuiteTypes extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("suites")); + + public static final SyntheticsSuiteTypes SUITES = new SyntheticsSuiteTypes("suites"); + + SyntheticsSuiteTypes(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTypesSerializer extends StdSerializer { + public SyntheticsSuiteTypesSerializer(Class t) { + super(t); + } + + public SyntheticsSuiteTypesSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteTypes value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteTypes fromValue(String value) { + return new SyntheticsSuiteTypes(value); + } +} diff --git a/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.freeze index ec35b858851..3f3e3c99f21 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.freeze @@ -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/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.json index bc7ac56f941..d243fbd8f58 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_suppression_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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 Account\"},\"version\":1}}}", + "body": "{\"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": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "54e5a340-5de4-8285-a606-324efbc11f5d" + "id": "f181dced-eb3e-bfdd-020a-40965b7229b2" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw", + "path": "/api/v2/security_monitoring/configuration/suppressions/uea-lab-big", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "e9742d91-8c62-9396-15fd-0a073429f463" + "id": "2b54ce26-df1a-55f2-8376-9da4db5d8f64" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw", + "path": "/api/v2/security_monitoring/configuration/suppressions/uea-lab-big", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Suppression with ID itm-ljs-0qw not found)\"]}", + "body": "{\"errors\":[\"not_found(Suppression with ID uea-lab-big not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "e9742d91-8c62-9396-15fd-0a073429f464" + "id": "2b54ce26-df1a-55f2-8376-9da4db5d8f65" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.freeze index 16f1a15eddc..a93a4d20e75 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.freeze @@ -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/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.json index 4656d9bdb38..69727929aad 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_suppression_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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 Account\"},\"version\":1}}}", + "body": "{\"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": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "0f0810a4-bb6e-d06b-4e28-254f21a399de" + "id": "de8b198e-3f08-189d-bac5-8243a23a6c6e" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df", + "path": "/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"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 Account\"},\"version\":1}}}", + "body": "{\"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": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "42e4b15c-099b-b608-2f86-850e2b995bfa" + "id": "e4ea82bb-5963-1f7b-73f1-b145f01a869a" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df", + "path": "/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "b106773a-5ae2-b87d-f8cb-461ca79195e7" + "id": "eb9719a8-99ec-7157-d461-3899c802b2f0" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.freeze index 66913264132..d0d5ccec313 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.freeze @@ -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/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.json index 735862452d8..dfde4ad373a 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_suppression_s_version_history_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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}}}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "033e1691-28bd-d988-a146-781673716fa1" + "id": "e4ecf284-d916-cf58-7572-d0e822e67625" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history", + "path": "/api/v2/security_monitoring/configuration/suppressions/456-piv-74h/version_history", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"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\":[]}}}}}", + "body": "{\"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" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "8c3d6b9a-30ce-5406-933f-512cb644bda7" + "id": "14bae097-aa0a-c347-3396-bfa6a75aef1b" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08", + "path": "/api/v2/security_monitoring/configuration/suppressions/456-piv-74h", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "86cf8291-215a-f95c-f482-37f971f42c58" + "id": "3cca0e33-ca70-78cd-461f-84eae086ab5d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.freeze b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.freeze deleted file mode 100644 index 23cdf460db7..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:28.523Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.json b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.json deleted file mode 100644 index f61f8f48301..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.json +++ /dev/null @@ -1,141 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "d8b623cb-fe4b-00c4-217f-366ceaa8cd81" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "62e38132-3fde-59a9-d031-732766e8a12a" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "queryStringParameters": { - "page[size]": [ - "1" - ], - "page[number]": [ - "0" - ], - "query": [ - "id:fgz-hyr-ibu OR id:lgh-7no-380" - ] - }, - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c585a7d1-9881-dc5b-d460-b1714231b0f9" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/lgh-7no-380", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "5329789a-6920-a318-48a1-5f1f7a75d084" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/fgz-hyr-ibu", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c8c4295f-3029-6d08-1e17-ce33ee527dc8" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.freeze b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.freeze deleted file mode 100644 index 89bfc8cd8ef..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:30.925Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.json b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.json deleted file mode 100644 index f7ee1372a07..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "5d559937-62cf-4bb1-23bb-52331e71796c" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "1794be2a-8757-c3e6-9bad-6e32a5279fb0" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "queryStringParameters": { - "sort": [ - "name" - ], - "query": [ - "id:5cq-vnw-eza OR id:fuu-xxd-kjd" - ] - }, - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "4e579531-d85d-bac9-15a6-68f29f36e23e" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/fuu-xxd-kjd", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "457db922-e7ed-74e8-e0cf-69a4bf39c49f" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/5cq-vnw-eza", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "bbc4dcbf-a0a1-7255-d8b8-692d9785aa97" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.freeze b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.freeze deleted file mode 100644 index d184a46ea08..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:33.088Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.json b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.json deleted file mode 100644 index 43c5d8d3659..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "6804f189-09de-0950-bf78-086b20b556ca" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"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": {}, - "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "f50d4629-2389-7973-c040-32367fac199a" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "queryStringParameters": { - "sort": [ - "-name" - ], - "query": [ - "id:osw-qyf-tqn OR id:pe9-gdi-ee2" - ] - }, - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"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" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "5bee98ca-76eb-3a3d-746f-51d6d1f1ce66" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/pe9-gdi-ee2", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "4d20b729-7b38-f715-f7df-aec60621d5e6" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/osw-qyf-tqn", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "f1eaffca-6f0d-6fc1-5a7a-6948b4a19559" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.freeze new file mode 100644 index 00000000000..768dee23bbc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-07T12:38:44.484Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.json new file mode 100644 index 00000000000..241e44afa8e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/synthetics/suites/search", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "36af715d-c1b1-13ae-5f98-7d3ee44b564b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.freeze new file mode 100644 index 00000000000..62723cd8d29 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-07T12:38:45.716Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.json new file mode 100644 index 00000000000..1e7794832be --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.json @@ -0,0 +1,62 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"message\":\"Notification message\",\"name\":\"Example suite name\",\"options\":{},\"tags\":[\"env:production\"],\"tests\":[],\"type\":\"suite\"},\"type\":\"suites\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/synthetics/suites", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "28246ef1-4beb-7593-0aef-1feb4367b252" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"public_ids\":[\"36n-bb6-njj\"]},\"type\":\"delete_suites_request\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/synthetics/suites/bulk-delete", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"type\":\"suites\",\"attributes\":{\"public_id\":\"36n-bb6-njj\",\"deleted_at\":\"2026-01-07 12:38:46.679914\"},\"id\":\"36n-bb6-njj\"}]}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1bd5428b-eb45-1f07-ea8a-b3d0bc71b1e8" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.freeze index e05f55dd710..8839a50677d 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.freeze @@ -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/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.json index fd9c0afb684..645a5152204 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_suppression_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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 Account\"},\"version\":1}}}", + "body": "{\"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": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "011620d6-2878-5fbd-5639-07e61fe5e4e2" + "id": "bb8c27c9-c16b-7adf-78e2-98be963db101" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc", + "path": "/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"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 Account\"},\"version\":2}}}", + "body": "{\"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": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "2195b1a9-82a2-a39e-a977-4a4bf2194053" + "id": "448c55e0-3dab-a9db-29da-dd5cdf04a54d" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc", + "path": "/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "52852935-bffe-e564-35b8-1f47b1b1dead" + "id": "d894e2e4-7856-f636-96c8-8e4a1ef9a9be" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 9d69fd33f22..c717223ca71 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 60e9df68bb9..2a6c599c306 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature b/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature index 133993b11b7..5697490c97b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 59046d30f0b..27b4f9d1f9b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4597,6 +4597,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": {