diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d649e729473..5e8ea4500bb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -338,6 +338,16 @@ components: required: true schema: type: string + DisableCorrections: + description: Whether to exclude correction windows from the SLO status calculation. + Defaults to false. + in: query + name: disable_corrections + required: false + schema: + default: false + example: false + type: boolean EntityID: description: UUID or Entity Ref. in: path @@ -449,6 +459,15 @@ components: required: false schema: $ref: '#/components/schemas/RelationType' + FromTimestamp: + description: The starting timestamp for the SLO status query in epoch seconds. + in: query + name: from_ts + required: true + schema: + example: 1690901870 + format: int64 + type: integer GCPSTSServiceAccountID: description: Your GCP STS enabled service account's unique ID. in: path @@ -1088,6 +1107,14 @@ components: required: false schema: type: boolean + SloID: + description: The ID of the SLO. + in: path + name: slo_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 + type: string SpansMetricIDParameter: description: The name of the span-based metric. in: path @@ -1109,6 +1136,15 @@ components: required: true schema: type: string + ToTimestamp: + description: The ending timestamp for the SLO status query in epoch seconds. + in: query + name: to_ts + required: true + schema: + example: 1706803070 + format: int64 + type: integer UserID: description: The ID of the user. in: path @@ -17446,70 +17482,6 @@ 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: @@ -44178,6 +44150,22 @@ components: from the other indexes type: string type: object + RawErrorBudgetRemaining: + description: The raw error budget remaining for the SLO. + properties: + unit: + description: The unit of the error budget (for example, `seconds`, `requests`). + example: seconds + type: string + value: + description: The numeric value of the remaining error budget. + example: 86400.5 + format: double + type: number + required: + - value + - unit + type: object ReadinessGate: description: Used to merge multiple branches into a single branch. properties: @@ -49570,6 +49558,18 @@ 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: @@ -51719,6 +51719,31 @@ 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`. @@ -51814,6 +51839,31 @@ 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: @@ -54302,6 +54352,70 @@ components: required: - attributes type: object + SloStatusData: + description: The data portion of the SLO status response. + properties: + attributes: + $ref: '#/components/schemas/SloStatusDataAttributes' + id: + description: The ID of the SLO. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/SloStatusType' + required: + - id + - type + - attributes + type: object + SloStatusDataAttributes: + description: The attributes of the SLO status. + properties: + error_budget_remaining: + description: The percentage of error budget remaining. + example: 99.5 + format: double + type: number + raw_error_budget_remaining: + $ref: '#/components/schemas/RawErrorBudgetRemaining' + sli: + description: The current Service Level Indicator (SLI) value as a percentage. + example: 99.95 + format: double + type: number + span_precision: + description: The precision of the time span in seconds. + example: 2 + format: int64 + type: integer + state: + description: The current state of the SLO (for example, `breached`, `warning`, + `ok`). + example: ok + type: string + required: + - sli + - error_budget_remaining + - raw_error_budget_remaining + - state + - span_precision + type: object + SloStatusResponse: + description: The SLO status response. + properties: + data: + $ref: '#/components/schemas/SloStatusData' + required: + - data + type: object + SloStatusType: + description: The type of the SLO status resource. + enum: + - slo_status + example: slo_status + type: string + x-enum-varnames: + - SLO_STATUS SoftwareCatalogTriggerWrapper: description: Schema for a Software Catalog-based trigger. properties: @@ -55497,31 +55611,6 @@ 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: @@ -55705,149 +55794,6 @@ 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: @@ -86359,12 +86305,29 @@ 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/SecurityMonitoringSuppressionsResponse' + $ref: '#/components/schemas/SecurityMonitoringPaginatedSuppressionsResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -88866,6 +88829,63 @@ paths: x-unstable: '**Note**: This feature is in private beta. To request access, use the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export) docs.' + /api/v2/slo/{slo_id}/status: + get: + description: 'Get the status of a Service Level Objective (SLO) for a given + time period. + + + This endpoint returns the current SLI value, error budget remaining, and other + status information for the specified SLO.' + operationId: GetSloStatus + parameters: + - $ref: '#/components/parameters/SloID' + - $ref: '#/components/parameters/FromTimestamp' + - $ref: '#/components/parameters/ToTimestamp' + - $ref: '#/components/parameters/DisableCorrections' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SloStatusResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Get SLO status + tags: + - Service Level Objectives + x-permission: + operator: OR + permissions: + - slos_read + x-unstable: '**Note**: This endpoint is in public beta and it''s subject to + change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/spa/recommendations/{service}: get: description: This endpoint is currently experimental and restricted to Datadog @@ -89328,227 +89348,6 @@ 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 d83a0c4256c..bd2a014139c 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.SecurityMonitoringSuppressionsResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse; 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 { - SecurityMonitoringSuppressionsResponse result = + SecurityMonitoringPaginatedSuppressionsResponse 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 new file mode 100644 index 00000000000..55634f1821c --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.java @@ -0,0 +1,37 @@ +// 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 new file mode 100644 index 00000000000..4e032ff32af --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.java @@ -0,0 +1,37 @@ +// 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 new file mode 100644 index 00000000000..64a631b2c19 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.java @@ -0,0 +1,37 @@ +// 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/service-level-objectives/GetSloStatus.java b/examples/v2/service-level-objectives/GetSloStatus.java new file mode 100644 index 00000000000..1205001b7f6 --- /dev/null +++ b/examples/v2/service-level-objectives/GetSloStatus.java @@ -0,0 +1,27 @@ +// Get SLO status returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ServiceLevelObjectivesApi; +import com.datadog.api.client.v2.model.SloStatusResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getSloStatus", true); + ServiceLevelObjectivesApi apiInstance = new ServiceLevelObjectivesApi(defaultClient); + + try { + SloStatusResponse result = + apiInstance.getSloStatus( + "00000000-0000-0000-0000-000000000000", 1690901870L, 1706803070L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ServiceLevelObjectivesApi#getSloStatus"); + 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 deleted file mode 100644 index a09cfeb589d..00000000000 --- a/examples/v2/synthetics/CreateSyntheticsSuite.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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 deleted file mode 100644 index 1b4089317bd..00000000000 --- a/examples/v2/synthetics/DeleteSyntheticsSuites.java +++ /dev/null @@ -1,38 +0,0 @@ -// 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 deleted file mode 100644 index 71821ec6670..00000000000 --- a/examples/v2/synthetics/EditSyntheticsSuite.java +++ /dev/null @@ -1,52 +0,0 @@ -// 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 deleted file mode 100644 index f86901b6449..00000000000 --- a/examples/v2/synthetics/GetSyntheticsSuite.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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 deleted file mode 100644 index 60a2bd8f983..00000000000 --- a/examples/v2/synthetics/SearchSuites.java +++ /dev/null @@ -1,24 +0,0 @@ -// 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/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 80129e2535b..1d9be7faf3f 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -908,6 +908,7 @@ public class ApiClient { put("v2.createSLOReportJob", false); put("v2.getSLOReport", false); put("v2.getSLOReportJobStatus", false); + put("v2.getSloStatus", false); put("v2.getSPARecommendations", false); put("v2.getSPARecommendationsWithShard", false); put("v2.createSCAResolveVulnerableSymbols", false); 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 20a964e4ec4..1da16233289 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,6 +62,7 @@ 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; @@ -82,6 +83,7 @@ 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; @@ -10543,6 +10545,9 @@ 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. @@ -10554,6 +10559,42 @@ 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; + } } /** @@ -10561,10 +10602,10 @@ public ListSecurityMonitoringSuppressionsOptionalParameters query(String query) * *

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

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

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

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> + * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> */ - public CompletableFuture + public CompletableFuture listSecurityMonitoringSuppressionsAsync( ListSecurityMonitoringSuppressionsOptionalParameters parameters) { return listSecurityMonitoringSuppressionsWithHttpInfoAsync(parameters) @@ -10624,7 +10665,7 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions * Get the list of all suppression rules. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSuppressionsResponse> + * @return ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10635,11 +10676,14 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions * *
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"; @@ -10647,6 +10691,9 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions 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( @@ -10665,7 +10712,7 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -10674,13 +10721,17 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse>> */ - 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"; @@ -10688,6 +10739,9 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions 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 { @@ -10701,7 +10755,7 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -10714,7 +10768,7 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions 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/ServiceLevelObjectivesApi.java b/src/main/java/com/datadog/api/client/v2/api/ServiceLevelObjectivesApi.java index e88c92e13aa..74e5131fc19 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ServiceLevelObjectivesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ServiceLevelObjectivesApi.java @@ -7,10 +7,12 @@ import com.datadog.api.client.v2.model.SLOReportPostResponse; import com.datadog.api.client.v2.model.SLOReportStatusGetResponse; import com.datadog.api.client.v2.model.SloReportCreateRequest; +import com.datadog.api.client.v2.model.SloStatusResponse; 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; @@ -504,4 +506,271 @@ public ApiResponse getSLOReportJobStatusWithHttpInfo false, new GenericType() {}); } + + /** Manage optional parameters to getSloStatus. */ + public static class GetSloStatusOptionalParameters { + private Boolean disableCorrections; + + /** + * Set disableCorrections. + * + * @param disableCorrections Whether to exclude correction windows from the SLO status + * calculation. Defaults to false. (optional, default to false) + * @return GetSloStatusOptionalParameters + */ + public GetSloStatusOptionalParameters disableCorrections(Boolean disableCorrections) { + this.disableCorrections = disableCorrections; + return this; + } + } + + /** + * Get SLO status. + * + *

See {@link #getSloStatusWithHttpInfo}. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @return SloStatusResponse + * @throws ApiException if fails to make API call + */ + public SloStatusResponse getSloStatus(String sloId, Long fromTs, Long toTs) throws ApiException { + return getSloStatusWithHttpInfo(sloId, fromTs, toTs, new GetSloStatusOptionalParameters()) + .getData(); + } + + /** + * Get SLO status. + * + *

See {@link #getSloStatusWithHttpInfoAsync}. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @return CompletableFuture<SloStatusResponse> + */ + public CompletableFuture getSloStatusAsync( + String sloId, Long fromTs, Long toTs) { + return getSloStatusWithHttpInfoAsync(sloId, fromTs, toTs, new GetSloStatusOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get SLO status. + * + *

See {@link #getSloStatusWithHttpInfo}. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return SloStatusResponse + * @throws ApiException if fails to make API call + */ + public SloStatusResponse getSloStatus( + String sloId, Long fromTs, Long toTs, GetSloStatusOptionalParameters parameters) + throws ApiException { + return getSloStatusWithHttpInfo(sloId, fromTs, toTs, parameters).getData(); + } + + /** + * Get SLO status. + * + *

See {@link #getSloStatusWithHttpInfoAsync}. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SloStatusResponse> + */ + public CompletableFuture getSloStatusAsync( + String sloId, Long fromTs, Long toTs, GetSloStatusOptionalParameters parameters) { + return getSloStatusWithHttpInfoAsync(sloId, fromTs, toTs, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the status of a Service Level Objective (SLO) for a given time period. + * + *

This endpoint returns the current SLI value, error budget remaining, and other status + * information for the specified SLO. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SloStatusResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSloStatusWithHttpInfo( + String sloId, Long fromTs, Long toTs, GetSloStatusOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSloStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'sloId' is set + if (sloId == null) { + throw new ApiException( + 400, "Missing the required parameter 'sloId' when calling getSloStatus"); + } + + // verify the required parameter 'fromTs' is set + if (fromTs == null) { + throw new ApiException( + 400, "Missing the required parameter 'fromTs' when calling getSloStatus"); + } + + // verify the required parameter 'toTs' is set + if (toTs == null) { + throw new ApiException( + 400, "Missing the required parameter 'toTs' when calling getSloStatus"); + } + Boolean disableCorrections = parameters.disableCorrections; + // create path and map variables + String localVarPath = + "/api/v2/slo/{slo_id}/status" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from_ts", fromTs)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to_ts", toTs)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "disable_corrections", disableCorrections)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ServiceLevelObjectivesApi.getSloStatus", + 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() {}); + } + + /** + * Get SLO status. + * + *

See {@link #getSloStatusWithHttpInfo}. + * + * @param sloId The ID of the SLO. (required) + * @param fromTs The starting timestamp for the SLO status query in epoch seconds. (required) + * @param toTs The ending timestamp for the SLO status query in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SloStatusResponse>> + */ + public CompletableFuture> getSloStatusWithHttpInfoAsync( + String sloId, Long fromTs, Long toTs, GetSloStatusOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getSloStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'sloId' is set + if (sloId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'sloId' when calling getSloStatus")); + return result; + } + + // verify the required parameter 'fromTs' is set + if (fromTs == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'fromTs' when calling getSloStatus")); + return result; + } + + // verify the required parameter 'toTs' is set + if (toTs == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'toTs' when calling getSloStatus")); + return result; + } + Boolean disableCorrections = parameters.disableCorrections; + // create path and map variables + String localVarPath = + "/api/v2/slo/{slo_id}/status" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from_ts", fromTs)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to_ts", toTs)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "disable_corrections", disableCorrections)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ServiceLevelObjectivesApi.getSloStatus", + 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() {}); + } } 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 78f8b4e8602..474f3ad7f24 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,20 +4,14 @@ 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; @@ -52,419 +46,6 @@ 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. * @@ -576,138 +157,6 @@ 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. * @@ -873,241 +322,6 @@ 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 deleted file mode 100644 index ce7bc7dc4ae..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java +++ /dev/null @@ -1,196 +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.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 deleted file mode 100644 index 5e99299cc43..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java +++ /dev/null @@ -1,166 +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.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/DeletedSuitesRequestDeleteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java deleted file mode 100644 index 779a3f44cde..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java +++ /dev/null @@ -1,186 +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.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/DeletedSuitesRequestType.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java deleted file mode 100644 index 90726e10043..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java +++ /dev/null @@ -1,57 +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; - -/** */ -@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/DeletedSuitesRequestDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/RawErrorBudgetRemaining.java similarity index 58% rename from src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java rename to src/main/java/com/datadog/api/client/v2/model/RawErrorBudgetRemaining.java index 331ff9be80d..67577b1f941 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RawErrorBudgetRemaining.java @@ -17,43 +17,69 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({DeletedSuitesRequestDeleteRequest.JSON_PROPERTY_DATA}) +/** The raw error budget remaining for the SLO. */ +@JsonPropertyOrder({ + RawErrorBudgetRemaining.JSON_PROPERTY_UNIT, + RawErrorBudgetRemaining.JSON_PROPERTY_VALUE +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DeletedSuitesRequestDeleteRequest { +public class RawErrorBudgetRemaining { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private DeletedSuitesRequestDelete data; + public static final String JSON_PROPERTY_UNIT = "unit"; + private String unit; - public DeletedSuitesRequestDeleteRequest() {} + public static final String JSON_PROPERTY_VALUE = "value"; + private Double value; + + public RawErrorBudgetRemaining() {} @JsonCreator - public DeletedSuitesRequestDeleteRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DeletedSuitesRequestDelete data) { - this.data = data; - this.unparsed |= data.unparsed; + public RawErrorBudgetRemaining( + @JsonProperty(required = true, value = JSON_PROPERTY_UNIT) String unit, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) Double value) { + this.unit = unit; + this.value = value; + } + + public RawErrorBudgetRemaining unit(String unit) { + this.unit = unit; + return this; + } + + /** + * The unit of the error budget (for example, seconds, requests). + * + * @return unit + */ + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; } - public DeletedSuitesRequestDeleteRequest data(DeletedSuitesRequestDelete data) { - this.data = data; - this.unparsed |= data.unparsed; + public RawErrorBudgetRemaining value(Double value) { + this.value = value; return this; } /** - * Getdata + * The numeric value of the remaining error budget. * - * @return data + * @return value */ - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DeletedSuitesRequestDelete getData() { - return data; + public Double getValue() { + return value; } - public void setData(DeletedSuitesRequestDelete data) { - this.data = data; + public void setValue(Double value) { + this.value = value; } /** @@ -68,10 +94,10 @@ public void setData(DeletedSuitesRequestDelete data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DeletedSuitesRequestDeleteRequest + * @return RawErrorBudgetRemaining */ @JsonAnySetter - public DeletedSuitesRequestDeleteRequest putAdditionalProperty(String key, Object value) { + public RawErrorBudgetRemaining putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +128,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DeletedSuitesRequestDeleteRequest object is equal to o. */ + /** Return true if this RawErrorBudgetRemaining object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,23 +137,23 @@ public boolean equals(Object o) { 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); + RawErrorBudgetRemaining rawErrorBudgetRemaining = (RawErrorBudgetRemaining) o; + return Objects.equals(this.unit, rawErrorBudgetRemaining.unit) + && Objects.equals(this.value, rawErrorBudgetRemaining.value) + && Objects.equals(this.additionalProperties, rawErrorBudgetRemaining.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(unit, value, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeletedSuitesRequestDeleteRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class RawErrorBudgetRemaining {\n"); + sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java similarity index 58% rename from src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java rename to src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java index c9d1de3e5ea..10b5fe51cfb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringPaginatedSuppressionsResponse.java @@ -18,24 +18,32 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({DeletedSuitesResponse.JSON_PROPERTY_DATA}) +/** Response object containing the available suppression rules with pagination metadata. */ +@JsonPropertyOrder({ + SecurityMonitoringPaginatedSuppressionsResponse.JSON_PROPERTY_DATA, + SecurityMonitoringPaginatedSuppressionsResponse.JSON_PROPERTY_META +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DeletedSuitesResponse { +public class SecurityMonitoringPaginatedSuppressionsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; - public DeletedSuitesResponse data(List data) { + public static final String JSON_PROPERTY_META = "meta"; + private SecurityMonitoringSuppressionsMeta meta; + + public SecurityMonitoringPaginatedSuppressionsResponse data( + List data) { this.data = data; - for (DeletedSuiteResponseData item : data) { + for (SecurityMonitoringSuppression item : data) { this.unparsed |= item.unparsed; } return this; } - public DeletedSuitesResponse addDataItem(DeletedSuiteResponseData dataItem) { + public SecurityMonitoringPaginatedSuppressionsResponse addDataItem( + SecurityMonitoringSuppression dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -45,21 +53,44 @@ public DeletedSuitesResponse addDataItem(DeletedSuiteResponseData dataItem) { } /** - * Getdata + * A list of suppressions objects. * * @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. @@ -72,10 +103,11 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DeletedSuitesResponse + * @return SecurityMonitoringPaginatedSuppressionsResponse */ @JsonAnySetter - public DeletedSuitesResponse putAdditionalProperty(String key, Object value) { + public SecurityMonitoringPaginatedSuppressionsResponse putAdditionalProperty( + String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -106,7 +138,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DeletedSuitesResponse object is equal to o. */ + /** Return true if this SecurityMonitoringPaginatedSuppressionsResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,21 +147,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeletedSuitesResponse deletedSuitesResponse = (DeletedSuitesResponse) o; - return Objects.equals(this.data, deletedSuitesResponse.data) - && Objects.equals(this.additionalProperties, deletedSuitesResponse.additionalProperties); + SecurityMonitoringPaginatedSuppressionsResponse + securityMonitoringPaginatedSuppressionsResponse = + (SecurityMonitoringPaginatedSuppressionsResponse) o; + return Objects.equals(this.data, securityMonitoringPaginatedSuppressionsResponse.data) + && Objects.equals(this.meta, securityMonitoringPaginatedSuppressionsResponse.meta) + && Objects.equals( + this.additionalProperties, + securityMonitoringPaginatedSuppressionsResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(data, meta, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeletedSuitesResponse {\n"); + sb.append("class SecurityMonitoringPaginatedSuppressionsResponse {\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 new file mode 100644 index 00000000000..b3c61e52e32 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionSort.java @@ -0,0 +1,87 @@ +/* + * 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/SyntheticsSuiteSearchResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java similarity index 68% rename from src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java rename to src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java index ce2831fec9d..ff2e81ede3c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsMeta.java @@ -16,35 +16,35 @@ import java.util.Map; import java.util.Objects; -/** Synthetics suite search response */ -@JsonPropertyOrder({SyntheticsSuiteSearchResponse.JSON_PROPERTY_DATA}) +/** Metadata for the suppression list response. */ +@JsonPropertyOrder({SecurityMonitoringSuppressionsMeta.JSON_PROPERTY_PAGE}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SyntheticsSuiteSearchResponse { +public class SecurityMonitoringSuppressionsMeta { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private SyntheticsSuiteSearchResponseData data; + public static final String JSON_PROPERTY_PAGE = "page"; + private SecurityMonitoringSuppressionsPageMeta page; - public SyntheticsSuiteSearchResponse data(SyntheticsSuiteSearchResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + public SecurityMonitoringSuppressionsMeta page(SecurityMonitoringSuppressionsPageMeta page) { + this.page = page; + this.unparsed |= page.unparsed; return this; } /** - * Synthetics suite search response data + * Pagination metadata. * - * @return data + * @return page */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsSuiteSearchResponseData getData() { - return data; + public SecurityMonitoringSuppressionsPageMeta getPage() { + return page; } - public void setData(SyntheticsSuiteSearchResponseData data) { - this.data = data; + public void setPage(SecurityMonitoringSuppressionsPageMeta page) { + this.page = page; } /** @@ -59,10 +59,10 @@ public void setData(SyntheticsSuiteSearchResponseData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return SyntheticsSuiteSearchResponse + * @return SecurityMonitoringSuppressionsMeta */ @JsonAnySetter - public SyntheticsSuiteSearchResponse putAdditionalProperty(String key, Object value) { + public SecurityMonitoringSuppressionsMeta 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 SyntheticsSuiteSearchResponse object is equal to o. */ + /** Return true if this SecurityMonitoringSuppressionsMeta object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,22 +102,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsSuiteSearchResponse syntheticsSuiteSearchResponse = (SyntheticsSuiteSearchResponse) o; - return Objects.equals(this.data, syntheticsSuiteSearchResponse.data) + SecurityMonitoringSuppressionsMeta securityMonitoringSuppressionsMeta = + (SecurityMonitoringSuppressionsMeta) o; + return Objects.equals(this.page, securityMonitoringSuppressionsMeta.page) && Objects.equals( - this.additionalProperties, syntheticsSuiteSearchResponse.additionalProperties); + this.additionalProperties, securityMonitoringSuppressionsMeta.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(page, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SyntheticsSuiteSearchResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class SecurityMonitoringSuppressionsMeta {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java index 09f21537830..79c8a1083c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSuppressionsPageMeta.java @@ -15,94 +15,87 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import java.util.UUID; -/** Synthetics suite search response data */ +/** Pagination metadata. */ @JsonPropertyOrder({ - SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ATTRIBUTES, - SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ID, - SyntheticsSuiteSearchResponseData.JSON_PROPERTY_TYPE + SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_PAGE_NUMBER, + SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_PAGE_SIZE, + SecurityMonitoringSuppressionsPageMeta.JSON_PROPERTY_TOTAL_COUNT }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SyntheticsSuiteSearchResponseData { +public class SecurityMonitoringSuppressionsPageMeta { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private SyntheticsSuiteSearchResponseDataAttributes attributes; + public static final String JSON_PROPERTY_PAGE_NUMBER = "pageNumber"; + private Long pageNumber; - public static final String JSON_PROPERTY_ID = "id"; - private UUID id; + public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize"; + private Long pageSize; - public static final String JSON_PROPERTY_TYPE = "type"; - private SuiteSearchResponseType type = SuiteSearchResponseType.SUITES_SEARCH; + public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount"; + private Long totalCount; - public SyntheticsSuiteSearchResponseData attributes( - SyntheticsSuiteSearchResponseDataAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + public SecurityMonitoringSuppressionsPageMeta pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } /** - * Synthetics suite search response data attributes + * Current page number. * - * @return attributes + * @return pageNumber */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonProperty(JSON_PROPERTY_PAGE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsSuiteSearchResponseDataAttributes getAttributes() { - return attributes; + public Long getPageNumber() { + return pageNumber; } - public void setAttributes(SyntheticsSuiteSearchResponseDataAttributes attributes) { - this.attributes = attributes; + public void setPageNumber(Long pageNumber) { + this.pageNumber = pageNumber; } - public SyntheticsSuiteSearchResponseData id(UUID id) { - this.id = id; + public SecurityMonitoringSuppressionsPageMeta pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Getid + * Current page size. * - * @return id + * @return pageSize */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UUID getId() { - return id; + public Long getPageSize() { + return pageSize; } - public void setId(UUID id) { - this.id = id; + public void setPageSize(Long pageSize) { + this.pageSize = pageSize; } - public SyntheticsSuiteSearchResponseData type(SuiteSearchResponseType type) { - this.type = type; - this.unparsed |= !type.isValid(); + public SecurityMonitoringSuppressionsPageMeta totalCount(Long totalCount) { + this.totalCount = totalCount; return this; } /** - * Gettype + * Total count of suppressions. * - * @return type + * @return totalCount */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SuiteSearchResponseType getType() { - return type; + public Long getTotalCount() { + return totalCount; } - public void setType(SuiteSearchResponseType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; } /** @@ -117,10 +110,10 @@ public void setType(SuiteSearchResponseType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return SyntheticsSuiteSearchResponseData + * @return SecurityMonitoringSuppressionsPageMeta */ @JsonAnySetter - public SyntheticsSuiteSearchResponseData putAdditionalProperty(String key, Object value) { + public SecurityMonitoringSuppressionsPageMeta putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -151,7 +144,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SyntheticsSuiteSearchResponseData object is equal to o. */ + /** Return true if this SecurityMonitoringSuppressionsPageMeta object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -160,27 +153,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsSuiteSearchResponseData syntheticsSuiteSearchResponseData = - (SyntheticsSuiteSearchResponseData) o; - return Objects.equals(this.attributes, syntheticsSuiteSearchResponseData.attributes) - && Objects.equals(this.id, syntheticsSuiteSearchResponseData.id) - && Objects.equals(this.type, syntheticsSuiteSearchResponseData.type) + SecurityMonitoringSuppressionsPageMeta securityMonitoringSuppressionsPageMeta = + (SecurityMonitoringSuppressionsPageMeta) o; + return Objects.equals(this.pageNumber, securityMonitoringSuppressionsPageMeta.pageNumber) + && Objects.equals(this.pageSize, securityMonitoringSuppressionsPageMeta.pageSize) + && Objects.equals(this.totalCount, securityMonitoringSuppressionsPageMeta.totalCount) && Objects.equals( - this.additionalProperties, syntheticsSuiteSearchResponseData.additionalProperties); + this.additionalProperties, securityMonitoringSuppressionsPageMeta.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); + return Objects.hash(pageNumber, pageSize, totalCount, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - 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("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(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\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/SloStatusData.java similarity index 70% rename from src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java rename to src/main/java/com/datadog/api/client/v2/model/SloStatusData.java index 75a316e6928..d9a7c4dc31f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java +++ b/src/main/java/com/datadog/api/client/v2/model/SloStatusData.java @@ -17,69 +17,73 @@ import java.util.Map; import java.util.Objects; -/** */ +/** The data portion of the SLO status response. */ @JsonPropertyOrder({ - DeletedSuitesRequestDelete.JSON_PROPERTY_ATTRIBUTES, - DeletedSuitesRequestDelete.JSON_PROPERTY_ID, - DeletedSuitesRequestDelete.JSON_PROPERTY_TYPE + SloStatusData.JSON_PROPERTY_ATTRIBUTES, + SloStatusData.JSON_PROPERTY_ID, + SloStatusData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DeletedSuitesRequestDelete { +public class SloStatusData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private DeletedSuitesRequestDeleteAttributes attributes; + private SloStatusDataAttributes 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; + private SloStatusType type; - public DeletedSuitesRequestDelete() {} + public SloStatusData() {} @JsonCreator - public DeletedSuitesRequestDelete( + public SloStatusData( @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - DeletedSuitesRequestDeleteAttributes attributes) { + SloStatusDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SloStatusType type) { this.attributes = attributes; this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public DeletedSuitesRequestDelete attributes(DeletedSuitesRequestDeleteAttributes attributes) { + public SloStatusData attributes(SloStatusDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Getattributes + * The attributes of the SLO status. * * @return attributes */ @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DeletedSuitesRequestDeleteAttributes getAttributes() { + public SloStatusDataAttributes getAttributes() { return attributes; } - public void setAttributes(DeletedSuitesRequestDeleteAttributes attributes) { + public void setAttributes(SloStatusDataAttributes attributes) { this.attributes = attributes; } - public DeletedSuitesRequestDelete id(String id) { + public SloStatusData id(String id) { this.id = id; return this; } /** - * Getid + * The ID of the SLO. * * @return id */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getId() { return id; } @@ -88,25 +92,24 @@ public void setId(String id) { this.id = id; } - public DeletedSuitesRequestDelete type(DeletedSuitesRequestType type) { + public SloStatusData type(SloStatusType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Gettype + * The type of the SLO status resource. * * @return type */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DeletedSuitesRequestType getType() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SloStatusType getType() { return type; } - public void setType(DeletedSuitesRequestType type) { + public void setType(SloStatusType type) { if (!type.isValid()) { this.unparsed = true; } @@ -125,10 +128,10 @@ public void setType(DeletedSuitesRequestType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return DeletedSuitesRequestDelete + * @return SloStatusData */ @JsonAnySetter - public DeletedSuitesRequestDelete putAdditionalProperty(String key, Object value) { + public SloStatusData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -159,7 +162,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DeletedSuitesRequestDelete object is equal to o. */ + /** Return true if this SloStatusData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -168,12 +171,11 @@ public boolean equals(Object o) { 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); + SloStatusData sloStatusData = (SloStatusData) o; + return Objects.equals(this.attributes, sloStatusData.attributes) + && Objects.equals(this.id, sloStatusData.id) + && Objects.equals(this.type, sloStatusData.type) + && Objects.equals(this.additionalProperties, sloStatusData.additionalProperties); } @Override @@ -184,7 +186,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeletedSuitesRequestDelete {\n"); + sb.append("class SloStatusData {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SloStatusDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SloStatusDataAttributes.java new file mode 100644 index 00000000000..a2898f9cb9c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SloStatusDataAttributes.java @@ -0,0 +1,275 @@ +/* + * 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; + +/** The attributes of the SLO status. */ +@JsonPropertyOrder({ + SloStatusDataAttributes.JSON_PROPERTY_ERROR_BUDGET_REMAINING, + SloStatusDataAttributes.JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING, + SloStatusDataAttributes.JSON_PROPERTY_SLI, + SloStatusDataAttributes.JSON_PROPERTY_SPAN_PRECISION, + SloStatusDataAttributes.JSON_PROPERTY_STATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SloStatusDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERROR_BUDGET_REMAINING = "error_budget_remaining"; + private Double errorBudgetRemaining; + + public static final String JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING = + "raw_error_budget_remaining"; + private RawErrorBudgetRemaining rawErrorBudgetRemaining; + + public static final String JSON_PROPERTY_SLI = "sli"; + private Double sli; + + public static final String JSON_PROPERTY_SPAN_PRECISION = "span_precision"; + private Long spanPrecision; + + public static final String JSON_PROPERTY_STATE = "state"; + private String state; + + public SloStatusDataAttributes() {} + + @JsonCreator + public SloStatusDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ERROR_BUDGET_REMAINING) + Double errorBudgetRemaining, + @JsonProperty(required = true, value = JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) + RawErrorBudgetRemaining rawErrorBudgetRemaining, + @JsonProperty(required = true, value = JSON_PROPERTY_SLI) Double sli, + @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_PRECISION) Long spanPrecision, + @JsonProperty(required = true, value = JSON_PROPERTY_STATE) String state) { + this.errorBudgetRemaining = errorBudgetRemaining; + this.rawErrorBudgetRemaining = rawErrorBudgetRemaining; + this.unparsed |= rawErrorBudgetRemaining.unparsed; + this.sli = sli; + this.spanPrecision = spanPrecision; + this.state = state; + } + + public SloStatusDataAttributes errorBudgetRemaining(Double errorBudgetRemaining) { + this.errorBudgetRemaining = errorBudgetRemaining; + return this; + } + + /** + * The percentage of error budget remaining. + * + * @return errorBudgetRemaining + */ + @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getErrorBudgetRemaining() { + return errorBudgetRemaining; + } + + public void setErrorBudgetRemaining(Double errorBudgetRemaining) { + this.errorBudgetRemaining = errorBudgetRemaining; + } + + public SloStatusDataAttributes rawErrorBudgetRemaining( + RawErrorBudgetRemaining rawErrorBudgetRemaining) { + this.rawErrorBudgetRemaining = rawErrorBudgetRemaining; + this.unparsed |= rawErrorBudgetRemaining.unparsed; + return this; + } + + /** + * The raw error budget remaining for the SLO. + * + * @return rawErrorBudgetRemaining + */ + @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RawErrorBudgetRemaining getRawErrorBudgetRemaining() { + return rawErrorBudgetRemaining; + } + + public void setRawErrorBudgetRemaining(RawErrorBudgetRemaining rawErrorBudgetRemaining) { + this.rawErrorBudgetRemaining = rawErrorBudgetRemaining; + } + + public SloStatusDataAttributes sli(Double sli) { + this.sli = sli; + return this; + } + + /** + * The current Service Level Indicator (SLI) value as a percentage. + * + * @return sli + */ + @JsonProperty(JSON_PROPERTY_SLI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSli() { + return sli; + } + + public void setSli(Double sli) { + this.sli = sli; + } + + public SloStatusDataAttributes spanPrecision(Long spanPrecision) { + this.spanPrecision = spanPrecision; + return this; + } + + /** + * The precision of the time span in seconds. + * + * @return spanPrecision + */ + @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSpanPrecision() { + return spanPrecision; + } + + public void setSpanPrecision(Long spanPrecision) { + this.spanPrecision = spanPrecision; + } + + public SloStatusDataAttributes state(String state) { + this.state = state; + return this; + } + + /** + * The current state of the SLO (for example, breached, warning, + * ok). + * + * @return state + */ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + /** + * 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 SloStatusDataAttributes + */ + @JsonAnySetter + public SloStatusDataAttributes 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 SloStatusDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SloStatusDataAttributes sloStatusDataAttributes = (SloStatusDataAttributes) o; + return Objects.equals(this.errorBudgetRemaining, sloStatusDataAttributes.errorBudgetRemaining) + && Objects.equals( + this.rawErrorBudgetRemaining, sloStatusDataAttributes.rawErrorBudgetRemaining) + && Objects.equals(this.sli, sloStatusDataAttributes.sli) + && Objects.equals(this.spanPrecision, sloStatusDataAttributes.spanPrecision) + && Objects.equals(this.state, sloStatusDataAttributes.state) + && Objects.equals(this.additionalProperties, sloStatusDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + errorBudgetRemaining, + rawErrorBudgetRemaining, + sli, + spanPrecision, + state, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SloStatusDataAttributes {\n"); + sb.append(" errorBudgetRemaining: ") + .append(toIndentedString(errorBudgetRemaining)) + .append("\n"); + sb.append(" rawErrorBudgetRemaining: ") + .append(toIndentedString(rawErrorBudgetRemaining)) + .append("\n"); + sb.append(" sli: ").append(toIndentedString(sli)).append("\n"); + sb.append(" spanPrecision: ").append(toIndentedString(spanPrecision)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).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/SloStatusResponse.java similarity index 79% rename from src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java rename to src/main/java/com/datadog/api/client/v2/model/SloStatusResponse.java index 231a5078ee2..fc46c80e890 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SloStatusResponse.java @@ -17,42 +17,42 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({SuiteCreateEditRequest.JSON_PROPERTY_DATA}) +/** The SLO status response. */ +@JsonPropertyOrder({SloStatusResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SuiteCreateEditRequest { +public class SloStatusResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private SuiteCreateEdit data; + private SloStatusData data; - public SuiteCreateEditRequest() {} + public SloStatusResponse() {} @JsonCreator - public SuiteCreateEditRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SuiteCreateEdit data) { + public SloStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SloStatusData data) { this.data = data; this.unparsed |= data.unparsed; } - public SuiteCreateEditRequest data(SuiteCreateEdit data) { + public SloStatusResponse data(SloStatusData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Getdata + * The data portion of the SLO status response. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SuiteCreateEdit getData() { + public SloStatusData getData() { return data; } - public void setData(SuiteCreateEdit data) { + public void setData(SloStatusData data) { this.data = data; } @@ -68,10 +68,10 @@ public void setData(SuiteCreateEdit data) { * * @param key The arbitrary key to set * @param value The associated value - * @return SuiteCreateEditRequest + * @return SloStatusResponse */ @JsonAnySetter - public SuiteCreateEditRequest putAdditionalProperty(String key, Object value) { + public SloStatusResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +102,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SuiteCreateEditRequest object is equal to o. */ + /** Return true if this SloStatusResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,9 +111,9 @@ public boolean equals(Object o) { 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); + SloStatusResponse sloStatusResponse = (SloStatusResponse) o; + return Objects.equals(this.data, sloStatusResponse.data) + && Objects.equals(this.additionalProperties, sloStatusResponse.additionalProperties); } @Override @@ -124,7 +124,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SuiteCreateEditRequest {\n"); + sb.append("class SloStatusResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java b/src/main/java/com/datadog/api/client/v2/model/SloStatusType.java similarity index 57% rename from src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java rename to src/main/java/com/datadog/api/client/v2/model/SloStatusType.java index 562031e7507..b33a6782e36 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SloStatusType.java @@ -18,37 +18,36 @@ import java.util.HashSet; import java.util.Set; -/** Type of the Synthetic suite, suite. */ -@JsonSerialize(using = SyntheticsSuiteType.SyntheticsSuiteTypeSerializer.class) -public class SyntheticsSuiteType extends ModelEnum { +/** The type of the SLO status resource. */ +@JsonSerialize(using = SloStatusType.SloStatusTypeSerializer.class) +public class SloStatusType extends ModelEnum { - private static final Set allowedValues = new HashSet(Arrays.asList("suite")); + private static final Set allowedValues = new HashSet(Arrays.asList("slo_status")); - public static final SyntheticsSuiteType SUITE = new SyntheticsSuiteType("suite"); + public static final SloStatusType SLO_STATUS = new SloStatusType("slo_status"); - SyntheticsSuiteType(String value) { + SloStatusType(String value) { super(value, allowedValues); } - public static class SyntheticsSuiteTypeSerializer extends StdSerializer { - public SyntheticsSuiteTypeSerializer(Class t) { + public static class SloStatusTypeSerializer extends StdSerializer { + public SloStatusTypeSerializer(Class t) { super(t); } - public SyntheticsSuiteTypeSerializer() { + public SloStatusTypeSerializer() { this(null); } @Override - public void serialize( - SyntheticsSuiteType value, JsonGenerator jgen, SerializerProvider provider) + public void serialize(SloStatusType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static SyntheticsSuiteType fromValue(String value) { - return new SyntheticsSuiteType(value); + public static SloStatusType fromValue(String value) { + return new SloStatusType(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 deleted file mode 100644 index 6035aeb897e..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java +++ /dev/null @@ -1,177 +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.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/SuiteSearchResponseType.java b/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java deleted file mode 100644 index f24f8ba8087..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java +++ /dev/null @@ -1,57 +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; - -/** */ -@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 deleted file mode 100644 index 063766f134c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java +++ /dev/null @@ -1,346 +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.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 deleted file mode 100644 index 6c674f3d606..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java +++ /dev/null @@ -1,135 +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.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 deleted file mode 100644 index ed61b3c73d8..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java +++ /dev/null @@ -1,136 +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.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 deleted file mode 100644 index c81bcb411c3..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java +++ /dev/null @@ -1,188 +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.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/SyntheticsSuiteSearchResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java deleted file mode 100644 index 703c5a9a63e..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java +++ /dev/null @@ -1,182 +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.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 deleted file mode 100644 index 053da52c187..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java +++ /dev/null @@ -1,179 +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.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 deleted file mode 100644 index 37788a87fb1..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java +++ /dev/null @@ -1,65 +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; - -/** 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/SyntheticsSuiteTypes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java deleted file mode 100644 index 516e53d5aac..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java +++ /dev/null @@ -1,54 +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; - -/** 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 3f3e3c99f21..ec35b858851 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 @@ -2025-11-07T12:27:26.759Z \ No newline at end of file +2026-01-14T17:29:03.168Z \ 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 d243fbd8f58..bc7ac56f941 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-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\"}}" + "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\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "f181dced-eb3e-bfdd-020a-40965b7229b2" + "id": "54e5a340-5de4-8285-a606-324efbc11f5d" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/uea-lab-big", + "path": "/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "2b54ce26-df1a-55f2-8376-9da4db5d8f64" + "id": "e9742d91-8c62-9396-15fd-0a073429f463" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/uea-lab-big", + "path": "/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Suppression with ID uea-lab-big not found)\"]}", + "body": "{\"errors\":[\"not_found(Suppression with ID itm-ljs-0qw not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "2b54ce26-df1a-55f2-8376-9da4db5d8f65" + "id": "e9742d91-8c62-9396-15fd-0a073429f464" } ] \ 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 a93a4d20e75..16f1a15eddc 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 @@ -2025-11-07T12:27:27.654Z \ No newline at end of file +2026-01-14T17:29:04.856Z \ 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 69727929aad..4656d9bdb38 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-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\"}}" + "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\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "de8b198e-3f08-189d-bac5-8243a23a6c6e" + "id": "0f0810a4-bb6e-d06b-4e28-254f21a399de" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg", + "path": "/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df", "keepAlive": false, "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "e4ea82bb-5963-1f7b-73f1-b145f01a869a" + "id": "42e4b15c-099b-b608-2f86-850e2b995bfa" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg", + "path": "/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "eb9719a8-99ec-7157-d461-3899c802b2f0" + "id": "b106773a-5ae2-b87d-f8cb-461ca79195e7" } ] \ 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 d0d5ccec313..66913264132 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 @@ -2025-11-26T13:33:06.482Z \ No newline at end of file +2026-01-14T17:29:05.317Z \ 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 dfde4ad373a..735862452d8 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-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\"}}" + "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\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "e4ecf284-d916-cf58-7572-d0e822e67625" + "id": "033e1691-28bd-d988-a146-781673716fa1" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions/456-piv-74h/version_history", + "path": "/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history", "keepAlive": false, "secure": true }, "httpResponse": { - "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\":[]}}}}}", + "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\":[]}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "14bae097-aa0a-c347-3396-bfa6a75aef1b" + "id": "8c3d6b9a-30ce-5406-933f-512cb644bda7" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/456-piv-74h", + "path": "/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "3cca0e33-ca70-78cd-461f-84eae086ab5d" + "id": "86cf8291-215a-f95c-f482-37f971f42c58" } ] \ 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 new file mode 100644 index 00000000000..23cdf460db7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.freeze @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..f61f8f48301 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_pagination.json @@ -0,0 +1,141 @@ +[ + { + "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 new file mode 100644 index 00000000000..89bfc8cd8ef --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.freeze @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..f7ee1372a07 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_ascending.json @@ -0,0 +1,138 @@ +[ + { + "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 new file mode 100644 index 00000000000..d184a46ea08 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.freeze @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..43c5d8d3659 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_suppression_rules_returns_OK_response_with_sort_descending.json @@ -0,0 +1,138 @@ +[ + { + "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 deleted file mode 100644 index 768dee23bbc..00000000000 --- a/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 241e44afa8e..00000000000 --- a/src/test/resources/cassettes/features/v2/Search_Synthetics_suites_returns_OK_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "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 deleted file mode 100644 index 62723cd8d29..00000000000 --- a/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1e7794832be..00000000000 --- a/src/test/resources/cassettes/features/v2/Synthetics_Create_a_test_suite_returns_OK_response.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "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 8839a50677d..e05f55dd710 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 @@ -2025-11-07T12:27:28.613Z \ No newline at end of file +2026-01-14T17:29:05.825Z \ 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 645a5152204..fd9c0afb684 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-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\"}}" + "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\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "bb8c27c9-c16b-7adf-78e2-98be963db101" + "id": "011620d6-2878-5fbd-5639-07e61fe5e4e2" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq", + "path": "/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc", "keepAlive": false, "secure": true }, "httpResponse": { - "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}}}", + "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}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "448c55e0-3dab-a9db-29da-dd5cdf04a54d" + "id": "2195b1a9-82a2-a39e-a977-4a4bf2194053" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq", + "path": "/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "d894e2e4-7856-f636-96c8-8e4a1ef9a9be" + "id": "52852935-bffe-e564-35b8-1f47b1b1dead" } ] \ 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 c717223ca71..9d69fd33f22 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\": \"{{ 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\": \"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}" } ], "step": "there is a valid \"suppression\" in the system", @@ -1043,6 +1043,18 @@ "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 2a6c599c306..60e9df68bb9 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,6 +1124,40 @@ 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/service_level_objectives.feature b/src/test/resources/com/datadog/api/client/v2/api/service_level_objectives.feature index a415d16ccec..4dc11df9e57 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/service_level_objectives.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/service_level_objectives.feature @@ -79,3 +79,33 @@ Feature: Service Level Objectives When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "report_id" + + @generated @skip @team:DataDog/slo-app + Scenario: Get SLO status returns "Bad Request" response + Given operation "GetSloStatus" enabled + And new "GetSloStatus" request + And request contains "slo_id" parameter from "REPLACE.ME" + And request contains "from_ts" parameter from "REPLACE.ME" + And request contains "to_ts" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/slo-app + Scenario: Get SLO status returns "Not Found" response + Given operation "GetSloStatus" enabled + And new "GetSloStatus" request + And request contains "slo_id" parameter from "REPLACE.ME" + And request contains "from_ts" parameter from "REPLACE.ME" + And request contains "to_ts" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/slo-app + Scenario: Get SLO status returns "OK" response + Given operation "GetSloStatus" enabled + And new "GetSloStatus" request + And request contains "slo_id" parameter from "REPLACE.ME" + And request contains "from_ts" parameter from "REPLACE.ME" + And request contains "to_ts" 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/synthetics.feature b/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature index 5697490c97b..133993b11b7 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,73 +51,3 @@ 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 b8cb1496229..72dc43d39f9 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 @@ -4578,6 +4578,12 @@ "type": "safe" } }, + "GetSloStatus": { + "tag": "Service Level Objectives", + "undo": { + "type": "safe" + } + }, "GetSPARecommendations": { "tag": "Spa", "undo": { @@ -4646,43 +4652,6 @@ "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": {