From 27b27e15825c60072f47eb3df5efb49ab94e0af7 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 8 Jun 2026 12:09:26 +0000 Subject: [PATCH] Regenerate client from commit 550d508 of spec repo --- .generator/schemas/v2/openapi.yaml | 171 ------------- .../v2/security-monitoring/MuteFindings.java | 55 ---- .../com/datadog/api/client/ApiClient.java | 1 - .../client/v2/api/SecurityMonitoringApi.java | 188 -------------- .../v2/model/BulkMuteFindingsRequest.java | 145 ----------- .../BulkMuteFindingsRequestAttributes.java | 93 ------- .../v2/model/BulkMuteFindingsRequestData.java | 240 ------------------ .../v2/model/BulkMuteFindingsRequestMeta.java | 151 ----------- .../BulkMuteFindingsRequestMetaFindings.java | 137 ---------- .../BulkMuteFindingsRequestProperties.java | 182 ------------- .../v2/model/BulkMuteFindingsResponse.java | 146 ----------- .../model/BulkMuteFindingsResponseData.java | 169 ------------ ...tch_of_findings_returns_OK_response.freeze | 1 - ...batch_of_findings_returns_OK_response.json | 32 --- .../client/v2/api/security_monitoring.feature | 32 --- .../com/datadog/api/client/v2/api/undo.json | 6 - 16 files changed, 1749 deletions(-) delete mode 100644 examples/v2/security-monitoring/MuteFindings.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequest.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMeta.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMetaFindings.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestProperties.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponse.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponseData.java delete mode 100644 src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 122c27ff508..d3670288b4d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13031,99 +13031,6 @@ components: type: string x-enum-varnames: - ITEMS - BulkMuteFindingsRequest: - description: The new bulk mute finding request. - properties: - data: - $ref: "#/components/schemas/BulkMuteFindingsRequestData" - required: - - data - type: object - BulkMuteFindingsRequestAttributes: - additionalProperties: false - description: The mute properties to be updated. - properties: - mute: - $ref: "#/components/schemas/BulkMuteFindingsRequestProperties" - required: - - mute - type: object - BulkMuteFindingsRequestData: - description: Data object containing the new bulk mute properties of the finding. - properties: - attributes: - $ref: "#/components/schemas/BulkMuteFindingsRequestAttributes" - id: - description: UUID to identify the request - example: dbe5f567-192b-4404-b908-29b70e1c9f76 - type: string - meta: - $ref: "#/components/schemas/BulkMuteFindingsRequestMeta" - type: - $ref: "#/components/schemas/FindingType" - required: - - id - - type - - attributes - - meta - type: object - BulkMuteFindingsRequestMeta: - description: Meta object containing the findings to be updated. - properties: - findings: - description: Array of findings. - items: - $ref: "#/components/schemas/BulkMuteFindingsRequestMetaFindings" - type: array - type: object - BulkMuteFindingsRequestMetaFindings: - description: Finding object containing the finding information. - properties: - finding_id: - $ref: "#/components/schemas/FindingID" - type: object - BulkMuteFindingsRequestProperties: - additionalProperties: false - description: Object containing the new mute properties of the findings. - properties: - description: - description: Additional information about the reason why those findings are muted or unmuted. This field has a maximum limit of 280 characters. - type: string - expiration_date: - description: |- - The expiration date of the mute or unmute action (Unix ms). It must be set to a value greater than the current timestamp. - If this field is not provided, the finding will be muted or unmuted indefinitely, which is equivalent to setting the expiration date to 9999999999999. - example: 1778721573794 - format: int64 - type: integer - muted: - description: Whether those findings should be muted or unmuted. - example: true - type: boolean - reason: - $ref: "#/components/schemas/FindingMuteReason" - required: - - muted - - reason - type: object - BulkMuteFindingsResponse: - description: The expected response schema. - properties: - data: - $ref: "#/components/schemas/BulkMuteFindingsResponseData" - required: - - data - type: object - BulkMuteFindingsResponseData: - description: Data object containing the ID of the request that was updated. - properties: - id: - description: UUID used to identify the request - example: 93bfeb70-af47-424d-908a-948d3f08e37f - type: string - type: - $ref: "#/components/schemas/FindingType" - type: object BulkPutAppsDatastoreItemsRequest: description: Request to insert multiple items into a datastore in a single operation. properties: @@ -148552,84 +148459,6 @@ paths: Use the [search security findings endpoint](https://docs.datadoghq.com/api/latest/security-monitoring/#search-security-findings), which is based on the [new security findings schema](https://docs.datadoghq.com/security/guide/findings-schema/), to search security findings. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - patch: - description: |- - Mute or unmute findings. - operationId: MuteFindings - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - mute: - expiration_date: 1778721573794 - muted: true - reason: ACCEPTED_RISK - id: dbe5f567-192b-4404-b908-29b70e1c9f76 - meta: - findings: - - finding_id: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== - type: finding - schema: - $ref: "#/components/schemas/BulkMuteFindingsRequest" - description: |- - ### Attributes - - All findings are updated with the same attributes. The request body must include at least two attributes: `muted` and `reason`. - The allowed reasons depend on whether the finding is being muted or unmuted: - - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. - - ### Meta - - The request body must include a list of the finding IDs to be updated. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - id: abc-123 - type: finding - schema: - $ref: "#/components/schemas/BulkMuteFindingsResponse" - description: OK - "400": - $ref: "#/components/responses/FindingsBadRequestResponse" - "403": - $ref: "#/components/responses/FindingsForbiddenResponse" - "404": - $ref: "#/components/responses/FindingsNotFoundResponse" - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: "Invalid Request: The server understands the request syntax but cannot process it due to invalid data." - "429": - $ref: "#/components/responses/FindingsTooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Mute or unmute a batch of findings - tags: - - "Security Monitoring" - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - security_monitoring_findings_write - - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in public beta. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/posture_management/findings/{finding_id}: get: description: Returns a single finding with message and resource configuration. diff --git a/examples/v2/security-monitoring/MuteFindings.java b/examples/v2/security-monitoring/MuteFindings.java deleted file mode 100644 index d280e956776..00000000000 --- a/examples/v2/security-monitoring/MuteFindings.java +++ /dev/null @@ -1,55 +0,0 @@ -// Mute or unmute a batch of findings returns "OK" response - -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.BulkMuteFindingsRequest; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequestAttributes; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequestData; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequestMeta; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequestMetaFindings; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequestProperties; -import com.datadog.api.client.v2.model.BulkMuteFindingsResponse; -import com.datadog.api.client.v2.model.FindingMuteReason; -import com.datadog.api.client.v2.model.FindingType; -import java.util.Collections; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.muteFindings", true); - SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - - BulkMuteFindingsRequest body = - new BulkMuteFindingsRequest() - .data( - new BulkMuteFindingsRequestData() - .attributes( - new BulkMuteFindingsRequestAttributes() - .mute( - new BulkMuteFindingsRequestProperties() - .expirationDate(1778721573794L) - .muted(true) - .reason(FindingMuteReason.ACCEPTED_RISK))) - .id("dbe5f567-192b-4404-b908-29b70e1c9f76") - .meta( - new BulkMuteFindingsRequestMeta() - .findings( - Collections.singletonList( - new BulkMuteFindingsRequestMetaFindings() - .findingId( - "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==")))) - .type(FindingType.FINDING)); - - try { - BulkMuteFindingsResponse result = apiInstance.muteFindings(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#muteFindings"); - 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 3c2d2401c35..eeea3437f42 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -944,7 +944,6 @@ public class ApiClient { put("v2.listStaticAnalysisCodegenRulesets", false); put("v2.listVulnerabilities", false); put("v2.listVulnerableAssets", false); - put("v2.muteFindings", false); put("v2.runHistoricalJob", false); put("v2.searchSecurityMonitoringHistsignals", false); put("v2.updateFindingsAssignee", 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 bcb269b2137..0b3d97b3b6a 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 @@ -13,8 +13,6 @@ import com.datadog.api.client.v2.model.AttachCaseRequest; import com.datadog.api.client.v2.model.AttachJiraIssueRequest; import com.datadog.api.client.v2.model.AttachServiceNowTicketRequest; -import com.datadog.api.client.v2.model.BulkMuteFindingsRequest; -import com.datadog.api.client.v2.model.BulkMuteFindingsResponse; import com.datadog.api.client.v2.model.CloudAssetType; import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest; import com.datadog.api.client.v2.model.CreateCaseRequestArray; @@ -20206,192 +20204,6 @@ public ApiResponse listVulnerableAssetsWithHttpInf new GenericType() {}); } - /** - * Mute or unmute a batch of findings. - * - *

See {@link #muteFindingsWithHttpInfo}. - * - * @param body - *

Attributes

- * All findings are updated with the same attributes. The request body must include at least - * two attributes: muted and reason. The allowed reasons depend on - * whether the finding is being muted or unmuted: - To mute a finding: PENDING_FIX - * , FALSE_POSITIVE, ACCEPTED_RISK, OTHER. - To - * unmute a finding : NO_PENDING_FIX, HUMAN_ERROR, - * NO_LONGER_ACCEPTED_RISK, OTHER. - *

Meta

- * The request body must include a list of the finding IDs to be updated. (required) - * @return BulkMuteFindingsResponse - * @throws ApiException if fails to make API call - */ - public BulkMuteFindingsResponse muteFindings(BulkMuteFindingsRequest body) throws ApiException { - return muteFindingsWithHttpInfo(body).getData(); - } - - /** - * Mute or unmute a batch of findings. - * - *

See {@link #muteFindingsWithHttpInfoAsync}. - * - * @param body - *

Attributes

- * All findings are updated with the same attributes. The request body must include at least - * two attributes: muted and reason. The allowed reasons depend on - * whether the finding is being muted or unmuted: - To mute a finding: PENDING_FIX - * , FALSE_POSITIVE, ACCEPTED_RISK, OTHER. - To - * unmute a finding : NO_PENDING_FIX, HUMAN_ERROR, - * NO_LONGER_ACCEPTED_RISK, OTHER. - *

Meta

- * The request body must include a list of the finding IDs to be updated. (required) - * @return CompletableFuture<BulkMuteFindingsResponse> - */ - public CompletableFuture muteFindingsAsync( - BulkMuteFindingsRequest body) { - return muteFindingsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Mute or unmute findings. - * - * @param body - *

Attributes

- * All findings are updated with the same attributes. The request body must include at least - * two attributes: muted and reason. The allowed reasons depend on - * whether the finding is being muted or unmuted: - To mute a finding: PENDING_FIX - * , FALSE_POSITIVE, ACCEPTED_RISK, OTHER. - To - * unmute a finding : NO_PENDING_FIX, HUMAN_ERROR, - * NO_LONGER_ACCEPTED_RISK, OTHER. - *

Meta

- * The request body must include a list of the finding IDs to be updated. (required) - * @return ApiResponse<BulkMuteFindingsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not Found: The requested finding cannot be found. -
422 Invalid Request: The server understands the request syntax but cannot process it due to invalid data. -
429 Too many requests: The rate limit set by the API has been exceeded. -
- */ - public ApiResponse muteFindingsWithHttpInfo( - BulkMuteFindingsRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "muteFindings"; - 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 = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling muteFindings"); - } - // create path and map variables - String localVarPath = "/api/v2/posture_management/findings"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.muteFindings", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Mute or unmute a batch of findings. - * - *

See {@link #muteFindingsWithHttpInfo}. - * - * @param body - *

Attributes

- * All findings are updated with the same attributes. The request body must include at least - * two attributes: muted and reason. The allowed reasons depend on - * whether the finding is being muted or unmuted: - To mute a finding: PENDING_FIX - * , FALSE_POSITIVE, ACCEPTED_RISK, OTHER. - To - * unmute a finding : NO_PENDING_FIX, HUMAN_ERROR, - * NO_LONGER_ACCEPTED_RISK, OTHER. - *

Meta

- * The request body must include a list of the finding IDs to be updated. (required) - * @return CompletableFuture<ApiResponse<BulkMuteFindingsResponse>> - */ - public CompletableFuture> muteFindingsWithHttpInfoAsync( - BulkMuteFindingsRequest body) { - // Check if unstable operation is enabled - String operationId = "muteFindings"; - 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 = 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 muteFindings")); - return result; - } - // create path and map variables - String localVarPath = "/api/v2/posture_management/findings"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.muteFindings", - 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( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** * Mute or unmute security findings. * diff --git a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequest.java deleted file mode 100644 index 4e2c5c41583..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequest.java +++ /dev/null @@ -1,145 +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; - -/** The new bulk mute finding request. */ -@JsonPropertyOrder({BulkMuteFindingsRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequest { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private BulkMuteFindingsRequestData data; - - public BulkMuteFindingsRequest() {} - - @JsonCreator - public BulkMuteFindingsRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) BulkMuteFindingsRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public BulkMuteFindingsRequest data(BulkMuteFindingsRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Data object containing the new bulk mute properties of the finding. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkMuteFindingsRequestData getData() { - return data; - } - - public void setData(BulkMuteFindingsRequestData 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 BulkMuteFindingsRequest - */ - @JsonAnySetter - public BulkMuteFindingsRequest 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 BulkMuteFindingsRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequest bulkMuteFindingsRequest = (BulkMuteFindingsRequest) o; - return Objects.equals(this.data, bulkMuteFindingsRequest.data) - && Objects.equals(this.additionalProperties, bulkMuteFindingsRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequest {\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/BulkMuteFindingsRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestAttributes.java deleted file mode 100644 index 5deee97e42c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestAttributes.java +++ /dev/null @@ -1,93 +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.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.Objects; - -/** The mute properties to be updated. */ -@JsonPropertyOrder({BulkMuteFindingsRequestAttributes.JSON_PROPERTY_MUTE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequestAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_MUTE = "mute"; - private BulkMuteFindingsRequestProperties mute; - - public BulkMuteFindingsRequestAttributes() {} - - @JsonCreator - public BulkMuteFindingsRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_MUTE) - BulkMuteFindingsRequestProperties mute) { - this.mute = mute; - this.unparsed |= mute.unparsed; - } - - public BulkMuteFindingsRequestAttributes mute(BulkMuteFindingsRequestProperties mute) { - this.mute = mute; - this.unparsed |= mute.unparsed; - return this; - } - - /** - * Object containing the new mute properties of the findings. - * - * @return mute - */ - @JsonProperty(JSON_PROPERTY_MUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkMuteFindingsRequestProperties getMute() { - return mute; - } - - public void setMute(BulkMuteFindingsRequestProperties mute) { - this.mute = mute; - } - - /** Return true if this BulkMuteFindingsRequestAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequestAttributes bulkMuteFindingsRequestAttributes = - (BulkMuteFindingsRequestAttributes) o; - return Objects.equals(this.mute, bulkMuteFindingsRequestAttributes.mute); - } - - @Override - public int hashCode() { - return Objects.hash(mute); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequestAttributes {\n"); - sb.append(" mute: ").append(toIndentedString(mute)).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/BulkMuteFindingsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestData.java deleted file mode 100644 index 2e032254736..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestData.java +++ /dev/null @@ -1,240 +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; - -/** Data object containing the new bulk mute properties of the finding. */ -@JsonPropertyOrder({ - BulkMuteFindingsRequestData.JSON_PROPERTY_ATTRIBUTES, - BulkMuteFindingsRequestData.JSON_PROPERTY_ID, - BulkMuteFindingsRequestData.JSON_PROPERTY_META, - BulkMuteFindingsRequestData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequestData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private BulkMuteFindingsRequestAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_META = "meta"; - private BulkMuteFindingsRequestMeta meta; - - public static final String JSON_PROPERTY_TYPE = "type"; - private FindingType type = FindingType.FINDING; - - public BulkMuteFindingsRequestData() {} - - @JsonCreator - public BulkMuteFindingsRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - BulkMuteFindingsRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_META) BulkMuteFindingsRequestMeta meta, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FindingType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.meta = meta; - this.unparsed |= meta.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); - } - - public BulkMuteFindingsRequestData attributes(BulkMuteFindingsRequestAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * The mute properties to be updated. - * - * @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkMuteFindingsRequestAttributes getAttributes() { - return attributes; - } - - public void setAttributes(BulkMuteFindingsRequestAttributes attributes) { - this.attributes = attributes; - } - - public BulkMuteFindingsRequestData id(String id) { - this.id = id; - return this; - } - - /** - * UUID to identify the request - * - * @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public BulkMuteFindingsRequestData meta(BulkMuteFindingsRequestMeta meta) { - this.meta = meta; - this.unparsed |= meta.unparsed; - return this; - } - - /** - * Meta object containing the findings to be updated. - * - * @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkMuteFindingsRequestMeta getMeta() { - return meta; - } - - public void setMeta(BulkMuteFindingsRequestMeta meta) { - this.meta = meta; - } - - public BulkMuteFindingsRequestData type(FindingType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * The JSON:API type for findings. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FindingType getType() { - return type; - } - - public void setType(FindingType 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 BulkMuteFindingsRequestData - */ - @JsonAnySetter - public BulkMuteFindingsRequestData 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 BulkMuteFindingsRequestData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequestData bulkMuteFindingsRequestData = (BulkMuteFindingsRequestData) o; - return Objects.equals(this.attributes, bulkMuteFindingsRequestData.attributes) - && Objects.equals(this.id, bulkMuteFindingsRequestData.id) - && Objects.equals(this.meta, bulkMuteFindingsRequestData.meta) - && Objects.equals(this.type, bulkMuteFindingsRequestData.type) - && Objects.equals( - this.additionalProperties, bulkMuteFindingsRequestData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, meta, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequestData {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).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/BulkMuteFindingsRequestMeta.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMeta.java deleted file mode 100644 index c2bc8d25569..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMeta.java +++ /dev/null @@ -1,151 +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; - -/** Meta object containing the findings to be updated. */ -@JsonPropertyOrder({BulkMuteFindingsRequestMeta.JSON_PROPERTY_FINDINGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequestMeta { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_FINDINGS = "findings"; - private List findings = null; - - public BulkMuteFindingsRequestMeta findings(List findings) { - this.findings = findings; - for (BulkMuteFindingsRequestMetaFindings item : findings) { - this.unparsed |= item.unparsed; - } - return this; - } - - public BulkMuteFindingsRequestMeta addFindingsItem( - BulkMuteFindingsRequestMetaFindings findingsItem) { - if (this.findings == null) { - this.findings = new ArrayList<>(); - } - this.findings.add(findingsItem); - this.unparsed |= findingsItem.unparsed; - return this; - } - - /** - * Array of findings. - * - * @return findings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FINDINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFindings() { - return findings; - } - - public void setFindings(List findings) { - this.findings = findings; - } - - /** - * 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 BulkMuteFindingsRequestMeta - */ - @JsonAnySetter - public BulkMuteFindingsRequestMeta 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 BulkMuteFindingsRequestMeta object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequestMeta bulkMuteFindingsRequestMeta = (BulkMuteFindingsRequestMeta) o; - return Objects.equals(this.findings, bulkMuteFindingsRequestMeta.findings) - && Objects.equals( - this.additionalProperties, bulkMuteFindingsRequestMeta.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(findings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequestMeta {\n"); - sb.append(" findings: ").append(toIndentedString(findings)).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/BulkMuteFindingsRequestMetaFindings.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMetaFindings.java deleted file mode 100644 index 78a472c25f5..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestMetaFindings.java +++ /dev/null @@ -1,137 +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; - -/** Finding object containing the finding information. */ -@JsonPropertyOrder({BulkMuteFindingsRequestMetaFindings.JSON_PROPERTY_FINDING_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequestMetaFindings { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_FINDING_ID = "finding_id"; - private String findingId; - - public BulkMuteFindingsRequestMetaFindings findingId(String findingId) { - this.findingId = findingId; - return this; - } - - /** - * The unique ID for this finding. - * - * @return findingId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FINDING_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFindingId() { - return findingId; - } - - public void setFindingId(String findingId) { - this.findingId = findingId; - } - - /** - * 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 BulkMuteFindingsRequestMetaFindings - */ - @JsonAnySetter - public BulkMuteFindingsRequestMetaFindings 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 BulkMuteFindingsRequestMetaFindings object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequestMetaFindings bulkMuteFindingsRequestMetaFindings = - (BulkMuteFindingsRequestMetaFindings) o; - return Objects.equals(this.findingId, bulkMuteFindingsRequestMetaFindings.findingId) - && Objects.equals( - this.additionalProperties, bulkMuteFindingsRequestMetaFindings.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(findingId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequestMetaFindings {\n"); - sb.append(" findingId: ").append(toIndentedString(findingId)).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/BulkMuteFindingsRequestProperties.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestProperties.java deleted file mode 100644 index d5f4459aa9c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsRequestProperties.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.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.Objects; - -/** Object containing the new mute properties of the findings. */ -@JsonPropertyOrder({ - BulkMuteFindingsRequestProperties.JSON_PROPERTY_DESCRIPTION, - BulkMuteFindingsRequestProperties.JSON_PROPERTY_EXPIRATION_DATE, - BulkMuteFindingsRequestProperties.JSON_PROPERTY_MUTED, - BulkMuteFindingsRequestProperties.JSON_PROPERTY_REASON -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsRequestProperties { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_EXPIRATION_DATE = "expiration_date"; - private Long expirationDate; - - public static final String JSON_PROPERTY_MUTED = "muted"; - private Boolean muted; - - public static final String JSON_PROPERTY_REASON = "reason"; - private FindingMuteReason reason; - - public BulkMuteFindingsRequestProperties() {} - - @JsonCreator - public BulkMuteFindingsRequestProperties( - @JsonProperty(required = true, value = JSON_PROPERTY_MUTED) Boolean muted, - @JsonProperty(required = true, value = JSON_PROPERTY_REASON) FindingMuteReason reason) { - this.muted = muted; - this.reason = reason; - this.unparsed |= !reason.isValid(); - } - - public BulkMuteFindingsRequestProperties description(String description) { - this.description = description; - return this; - } - - /** - * Additional information about the reason why those findings are muted or unmuted. This field has - * a maximum limit of 280 characters. - * - * @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public BulkMuteFindingsRequestProperties expirationDate(Long expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * The expiration date of the mute or unmute action (Unix ms). It must be set to a value greater - * than the current timestamp. If this field is not provided, the finding will be muted or unmuted - * indefinitely, which is equivalent to setting the expiration date to 9999999999999. - * - * @return expirationDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(Long expirationDate) { - this.expirationDate = expirationDate; - } - - public BulkMuteFindingsRequestProperties muted(Boolean muted) { - this.muted = muted; - return this; - } - - /** - * Whether those findings should be muted or unmuted. - * - * @return muted - */ - @JsonProperty(JSON_PROPERTY_MUTED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getMuted() { - return muted; - } - - public void setMuted(Boolean muted) { - this.muted = muted; - } - - public BulkMuteFindingsRequestProperties reason(FindingMuteReason reason) { - this.reason = reason; - this.unparsed |= !reason.isValid(); - return this; - } - - /** - * The reason why this finding is muted or unmuted. - * - * @return reason - */ - @JsonProperty(JSON_PROPERTY_REASON) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FindingMuteReason getReason() { - return reason; - } - - public void setReason(FindingMuteReason reason) { - if (!reason.isValid()) { - this.unparsed = true; - } - this.reason = reason; - } - - /** Return true if this BulkMuteFindingsRequestProperties object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsRequestProperties bulkMuteFindingsRequestProperties = - (BulkMuteFindingsRequestProperties) o; - return Objects.equals(this.description, bulkMuteFindingsRequestProperties.description) - && Objects.equals(this.expirationDate, bulkMuteFindingsRequestProperties.expirationDate) - && Objects.equals(this.muted, bulkMuteFindingsRequestProperties.muted) - && Objects.equals(this.reason, bulkMuteFindingsRequestProperties.reason); - } - - @Override - public int hashCode() { - return Objects.hash(description, expirationDate, muted, reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsRequestProperties {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" muted: ").append(toIndentedString(muted)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).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/BulkMuteFindingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponse.java deleted file mode 100644 index 6e2a18662e2..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponse.java +++ /dev/null @@ -1,146 +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; - -/** The expected response schema. */ -@JsonPropertyOrder({BulkMuteFindingsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsResponse { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private BulkMuteFindingsResponseData data; - - public BulkMuteFindingsResponse() {} - - @JsonCreator - public BulkMuteFindingsResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - BulkMuteFindingsResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public BulkMuteFindingsResponse data(BulkMuteFindingsResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Data object containing the ID of the request that was updated. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkMuteFindingsResponseData getData() { - return data; - } - - public void setData(BulkMuteFindingsResponseData 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 BulkMuteFindingsResponse - */ - @JsonAnySetter - public BulkMuteFindingsResponse 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 BulkMuteFindingsResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsResponse bulkMuteFindingsResponse = (BulkMuteFindingsResponse) o; - return Objects.equals(this.data, bulkMuteFindingsResponse.data) - && Objects.equals(this.additionalProperties, bulkMuteFindingsResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsResponse {\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/BulkMuteFindingsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponseData.java deleted file mode 100644 index b25e0717f14..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/BulkMuteFindingsResponseData.java +++ /dev/null @@ -1,169 +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; - -/** Data object containing the ID of the request that was updated. */ -@JsonPropertyOrder({ - BulkMuteFindingsResponseData.JSON_PROPERTY_ID, - BulkMuteFindingsResponseData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class BulkMuteFindingsResponseData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private FindingType type = FindingType.FINDING; - - public BulkMuteFindingsResponseData id(String id) { - this.id = id; - return this; - } - - /** - * UUID used to identify the request - * - * @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 BulkMuteFindingsResponseData type(FindingType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * The JSON:API type for findings. - * - * @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FindingType getType() { - return type; - } - - public void setType(FindingType 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 BulkMuteFindingsResponseData - */ - @JsonAnySetter - public BulkMuteFindingsResponseData 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 BulkMuteFindingsResponseData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkMuteFindingsResponseData bulkMuteFindingsResponseData = (BulkMuteFindingsResponseData) o; - return Objects.equals(this.id, bulkMuteFindingsResponseData.id) - && Objects.equals(this.type, bulkMuteFindingsResponseData.type) - && Objects.equals( - this.additionalProperties, bulkMuteFindingsResponseData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkMuteFindingsResponseData {\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/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.freeze deleted file mode 100644 index 107d7654662..00000000000 --- a/src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-10-27T12:59:49.496Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.json deleted file mode 100644 index 88e346bc04f..00000000000 --- a/src/test/resources/cassettes/features/v2/Mute_or_unmute_a_batch_of_findings_returns_OK_response.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"mute\":{\"expiration_date\":1778721573794,\"muted\":true,\"reason\":\"ACCEPTED_RISK\"}},\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"meta\":{\"findings\":[{\"finding_id\":\"ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==\"}]},\"type\":\"finding\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/posture_management/findings", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"type\":\"finding\"}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "06640b82-f0de-0289-0201-27b16d820851" - } -] \ No newline at end of file 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 bae8918780e..4b53fadbcdc 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 @@ -2359,38 +2359,6 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Mute or unmute a batch of findings returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response - Given operation "MuteFindings" enabled - And new "MuteFindings" request - And body with value {"data": {"attributes": {"mute": {"expiration_date": 1778721573794, "muted": true, "reason": "ACCEPTED_RISK"}}, "id": "dbe5f567-192b-4404-b908-29b70e1c9f76", "meta": {"findings": [{"finding_id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="}]}, "type": "finding"}} - When the request is sent - Then the response status is 400 Bad Request: The server cannot process the request due to invalid syntax in the request. - - @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Mute or unmute a batch of findings returns "Invalid Request: The server understands the request syntax but cannot process it due to invalid data." response - Given operation "MuteFindings" enabled - And new "MuteFindings" request - And body with value {"data": {"attributes": {"mute": {"expiration_date": 1778721573794, "muted": true, "reason": "ACCEPTED_RISK"}}, "id": "dbe5f567-192b-4404-b908-29b70e1c9f76", "meta": {"findings": [{"finding_id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="}]}, "type": "finding"}} - When the request is sent - Then the response status is 422 Invalid Request: The server understands the request syntax but cannot process it due to invalid data. - - @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Mute or unmute a batch of findings returns "Not Found: The requested finding cannot be found." response - Given operation "MuteFindings" enabled - And new "MuteFindings" request - And body with value {"data": {"attributes": {"mute": {"expiration_date": 1778721573794, "muted": true, "reason": "ACCEPTED_RISK"}}, "id": "dbe5f567-192b-4404-b908-29b70e1c9f76", "meta": {"findings": [{"finding_id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="}]}, "type": "finding"}} - When the request is sent - Then the response status is 404 Not Found: The requested finding cannot be found. - - @replay-only @team:DataDog/cloud-security-posture-management - Scenario: Mute or unmute a batch of findings returns "OK" response - Given operation "MuteFindings" enabled - And new "MuteFindings" request - And body with value {"data": {"attributes": {"mute": {"expiration_date": 1778721573794, "muted": true, "reason": "ACCEPTED_RISK"}}, "id": "dbe5f567-192b-4404-b908-29b70e1c9f76", "meta": {"findings":[{"finding_id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="}]}, "type": "finding"}} - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/k9-investigation Scenario: Mute or unmute security findings returns "Accepted" response Given new "MuteSecurityFindings" request 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 d4fc6eda6e7..dd2cf5b3d46 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 @@ -5479,12 +5479,6 @@ "type": "safe" } }, - "MuteFindings": { - "tag": "Security Monitoring", - "undo": { - "type": "safe" - } - }, "GetFinding": { "tag": "Security Monitoring", "undo": {