From 62707e92924d89f4c082113817b75e978fc8b937 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 31 Mar 2026 07:49:34 +0000 Subject: [PATCH] Regenerate client from commit a31b8f6 of spec repo --- .generator/schemas/v1/openapi.yaml | 14 - .generator/schemas/v2/openapi.yaml | 231 +++++++++ ...EditSecurityMonitoringSignalsAssignee.java | 42 ++ ...ulkEditSecurityMonitoringSignalsState.java | 45 ++ .../HourlyUsageAttributionUsageType.java | 3 - ...nthlyUsageAttributionSupportedMetrics.java | 6 - .../model/MonthlyUsageAttributionValues.java | 65 --- .../client/v2/api/SecurityMonitoringApi.java | 292 +++++++++++ ...ngSignalsBulkAssigneeUpdateAttributes.java | 181 +++++++ ...nitoringSignalsBulkAssigneeUpdateData.java | 214 ++++++++ ...oringSignalsBulkAssigneeUpdateRequest.java | 164 +++++++ ...yMonitoringSignalsBulkStateUpdateData.java | 212 ++++++++ ...nitoringSignalsBulkStateUpdateRequest.java | 162 +++++++ ...urityMonitoringSignalsBulkTriageEvent.java | 180 +++++++ ...oringSignalsBulkTriageEventAttributes.java | 455 ++++++++++++++++++ ...toringSignalsBulkTriageUpdateResponse.java | 210 ++++++++ ...nitoringSignalsBulkTriageUpdateResult.java | 192 ++++++++ .../client/v2/api/security_monitoring.feature | 30 ++ .../com/datadog/api/client/v2/api/undo.json | 12 + 19 files changed, 2622 insertions(+), 88 deletions(-) create mode 100644 examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsAssignee.java create mode 100644 examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsState.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEvent.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEventAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResult.java diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ad2439bee53..737ab6bffde 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -4579,7 +4579,6 @@ components: - sca_fargate_usage - sds_scanned_bytes_usage - serverless_apps_usage - - serverless_apps_apm_usage - siem_analyzed_logs_add_on_usage - siem_ingested_bytes_usage - snmp_usage @@ -4667,7 +4666,6 @@ components: - SCA_FARGATE_USAGE - SDS_SCANNED_BYTES_USAGE - SERVERLESS_APPS_USAGE - - SERVERLESS_APPS_APM_USAGE - SIEM_ANALYZED_LOGS_ADD_ON_USAGE - SIEM_INGESTED_BYTES_USAGE - SNMP_USAGE @@ -9158,8 +9156,6 @@ components: - published_app_percentage - serverless_apps_usage - serverless_apps_percentage - - serverless_apps_apm_usage - - serverless_apps_apm_percentage - snmp_usage - snmp_percentage - universal_service_monitoring_usage @@ -9325,8 +9321,6 @@ components: - PUBLISHED_APP_PERCENTAGE - SERVERLESS_APPS_USAGE - SERVERLESS_APPS_PERCENTAGE - - SERVERLESS_APPS_APM_USAGE - - SERVERLESS_APPS_APM_PERCENTAGE - SNMP_USAGE - SNMP_PERCENTAGE - UNIVERSAL_SERVICE_MONITORING_USAGE @@ -9984,14 +9978,6 @@ components: description: The total Sensitive Data Scanner usage by tag(s). format: double type: number - serverless_apps_apm_percentage: - description: The percentage of Serverless Apps APM usage by tag(s). - format: double - type: number - serverless_apps_apm_usage: - description: The total Serverless Apps APM usage by tag(s). - format: double - type: number serverless_apps_percentage: description: The percentage of Serverless Apps usage by tag(s). format: double diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2c27fbce2be..94bfc15b998 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -58505,6 +58505,155 @@ components: description: Version of the updated signal. If server side version is higher, update will be rejected. format: int64 type: integer + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes: + description: Attributes describing the new assignees for a bulk signal update. + properties: + assignee: + description: UUID of the user to assign to the signal. Use an empty string to unassign. + example: 773b045d-ccf8-4808-bd3b-955ef6a8c940 + type: string + version: + $ref: "#/components/schemas/SecurityMonitoringSignalVersion" + required: + - assignee + type: object + SecurityMonitoringSignalsBulkAssigneeUpdateData: + description: Data for updating the assignees for multiple security signals. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes" + id: + description: The unique ID of the security signal. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringSignalType" + required: + - id + - attributes + type: object + SecurityMonitoringSignalsBulkAssigneeUpdateRequest: + description: Request body for updating the assignee of multiple security signals. + properties: + data: + description: An array of signal assignee updates. + items: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateData" + maxItems: 199 + type: array + required: + - data + type: object + SecurityMonitoringSignalsBulkStateUpdateData: + description: Data for updating the state for multiple security signals. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringSignalStateUpdateAttributes" + id: + description: The unique ID of the security signal. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringSignalType" + required: + - id + - attributes + type: object + SecurityMonitoringSignalsBulkStateUpdateRequest: + description: Request body for updating the triage states of multiple security signals. + properties: + data: + description: An array of signal state updates. + items: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkStateUpdateData" + maxItems: 199 + type: array + required: + - data + type: object + SecurityMonitoringSignalsBulkTriageEvent: + description: A single signal event entry in a bulk triage update response. + properties: + event: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageEventAttributes" + id: + description: The unique ID of the security signal. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + required: + - id + - event + type: object + SecurityMonitoringSignalsBulkTriageEventAttributes: + description: Triage attributes of a security signal returned in a bulk update response. + properties: + archive_comment: + $ref: "#/components/schemas/SecurityMonitoringSignalArchiveComment" + archive_comment_timestamp: + description: Timestamp of the last edit to the archive comment. + format: int64 + type: integer + archive_comment_user: + $ref: "#/components/schemas/SecurityMonitoringTriageUser" + archive_reason: + $ref: "#/components/schemas/SecurityMonitoringSignalArchiveReason" + assignee: + $ref: "#/components/schemas/SecurityMonitoringTriageUser" + id: + description: The unique ID of the security signal. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + incident_ids: + $ref: "#/components/schemas/SecurityMonitoringSignalIncidentIds" + state: + $ref: "#/components/schemas/SecurityMonitoringSignalState" + state_update_timestamp: + description: Timestamp of the last state update. + format: int64 + type: integer + state_update_user: + $ref: "#/components/schemas/SecurityMonitoringTriageUser" + required: + - id + - state + - assignee + - incident_ids + type: object + SecurityMonitoringSignalsBulkTriageUpdateResponse: + description: Response for a bulk triage update of security signals. + properties: + result: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResult" + status: + description: The status of the bulk operation. + example: done + type: string + type: + description: The type of the response. + example: status + type: string + required: + - type + - status + - result + type: object + SecurityMonitoringSignalsBulkTriageUpdateResult: + description: The result payload of a bulk signal triage update. + properties: + count: + description: The number of signals updated. + example: 2 + format: int64 + type: integer + events: + description: The list of updated signals. + items: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageEvent" + type: array + required: + - count + - events + type: object SecurityMonitoringSignalsListResponse: description: "The response object with all security signals matching the request\nand pagination information." properties: @@ -103394,6 +103543,88 @@ paths: operator: OR permissions: - security_monitoring_signals_read + /api/v2/security_monitoring/signals/bulk/assignee: + patch: + description: |- + Change the triage assignees of multiple security signals at once. + The maximum number of signals that can be updated in a single request is 199. + operationId: BulkEditSecurityMonitoringSignalsAssignee + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateRequest" + description: Attributes describing the signal assignee updates. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResponse" + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Bulk update triage assignee of security signals + tags: ["Security Monitoring"] + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_signals_write + /api/v2/security_monitoring/signals/bulk/state: + patch: + description: |- + Change the triage states of multiple security signals at once. + The maximum number of signals that can be updated in a single request is 199. + operationId: BulkEditSecurityMonitoringSignalsState + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkStateUpdateRequest" + description: Attributes describing the signal state updates. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResponse" + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Bulk update triage state of security signals + tags: ["Security Monitoring"] + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_signals_write /api/v2/security_monitoring/signals/search: post: description: |- diff --git a/examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsAssignee.java b/examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsAssignee.java new file mode 100644 index 00000000000..f2f307c9ed3 --- /dev/null +++ b/examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsAssignee.java @@ -0,0 +1,42 @@ +// Bulk update triage assignee of security signals 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.SecurityMonitoringSignalType; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkAssigneeUpdateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkAssigneeUpdateData; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkAssigneeUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkTriageUpdateResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + SecurityMonitoringSignalsBulkAssigneeUpdateRequest body = + new SecurityMonitoringSignalsBulkAssigneeUpdateRequest() + .data( + Collections.singletonList( + new SecurityMonitoringSignalsBulkAssigneeUpdateData() + .attributes( + new SecurityMonitoringSignalsBulkAssigneeUpdateAttributes() + .assignee("773b045d-ccf8-4808-bd3b-955ef6a8c940")) + .id("AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA") + .type(SecurityMonitoringSignalType.SIGNAL))); + + try { + SecurityMonitoringSignalsBulkTriageUpdateResponse result = + apiInstance.bulkEditSecurityMonitoringSignalsAssignee(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#bulkEditSecurityMonitoringSignalsAssignee"); + 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/BulkEditSecurityMonitoringSignalsState.java b/examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsState.java new file mode 100644 index 00000000000..3cd0ca2df04 --- /dev/null +++ b/examples/v2/security-monitoring/BulkEditSecurityMonitoringSignalsState.java @@ -0,0 +1,45 @@ +// Bulk update triage state of security signals 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.SecurityMonitoringSignalArchiveReason; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalState; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalType; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkStateUpdateData; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkStateUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkTriageUpdateResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + SecurityMonitoringSignalsBulkStateUpdateRequest body = + new SecurityMonitoringSignalsBulkStateUpdateRequest() + .data( + Collections.singletonList( + new SecurityMonitoringSignalsBulkStateUpdateData() + .attributes( + new SecurityMonitoringSignalStateUpdateAttributes() + .archiveReason(SecurityMonitoringSignalArchiveReason.NONE) + .state(SecurityMonitoringSignalState.OPEN)) + .id("AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA") + .type(SecurityMonitoringSignalType.SIGNAL))); + + try { + SecurityMonitoringSignalsBulkTriageUpdateResponse result = + apiInstance.bulkEditSecurityMonitoringSignalsState(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#bulkEditSecurityMonitoringSignalsState"); + 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/v1/model/HourlyUsageAttributionUsageType.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java index a46bb5afc82..8485697178f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java @@ -111,7 +111,6 @@ public class HourlyUsageAttributionUsageType extends ModelEnum { "sca_fargate_usage", "sds_scanned_bytes_usage", "serverless_apps_usage", - "serverless_apps_apm_usage", "siem_analyzed_logs_add_on_usage", "siem_ingested_bytes_usage", "snmp_usage", @@ -278,8 +277,6 @@ public class HourlyUsageAttributionUsageType extends ModelEnum { new HourlyUsageAttributionUsageType("sds_scanned_bytes_usage"); public static final HourlyUsageAttributionUsageType SERVERLESS_APPS_USAGE = new HourlyUsageAttributionUsageType("serverless_apps_usage"); - public static final HourlyUsageAttributionUsageType SERVERLESS_APPS_APM_USAGE = - new HourlyUsageAttributionUsageType("serverless_apps_apm_usage"); public static final HourlyUsageAttributionUsageType SIEM_ANALYZED_LOGS_ADD_ON_USAGE = new HourlyUsageAttributionUsageType("siem_analyzed_logs_add_on_usage"); public static final HourlyUsageAttributionUsageType SIEM_INGESTED_BYTES_USAGE = diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java index fd5d59b9bf0..bb4d5f4e78a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java @@ -136,8 +136,6 @@ public class MonthlyUsageAttributionSupportedMetrics extends ModelEnum { "published_app_percentage", "serverless_apps_usage", "serverless_apps_percentage", - "serverless_apps_apm_usage", - "serverless_apps_apm_percentage", "snmp_usage", "snmp_percentage", "universal_service_monitoring_usage", @@ -412,10 +410,6 @@ public class MonthlyUsageAttributionSupportedMetrics extends ModelEnum { new MonthlyUsageAttributionSupportedMetrics("serverless_apps_usage"); public static final MonthlyUsageAttributionSupportedMetrics SERVERLESS_APPS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("serverless_apps_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics SERVERLESS_APPS_APM_USAGE = - new MonthlyUsageAttributionSupportedMetrics("serverless_apps_apm_usage"); - public static final MonthlyUsageAttributionSupportedMetrics SERVERLESS_APPS_APM_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("serverless_apps_apm_percentage"); public static final MonthlyUsageAttributionSupportedMetrics SNMP_USAGE = new MonthlyUsageAttributionSupportedMetrics("snmp_usage"); public static final MonthlyUsageAttributionSupportedMetrics SNMP_PERCENTAGE = diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java index 0afe7a1a54c..768fa72ae9f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java @@ -166,8 +166,6 @@ MonthlyUsageAttributionValues.JSON_PROPERTY_SCA_FARGATE_USAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SDS_SCANNED_BYTES_PERCENTAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SDS_SCANNED_BYTES_USAGE, - MonthlyUsageAttributionValues.JSON_PROPERTY_SERVERLESS_APPS_APM_PERCENTAGE, - MonthlyUsageAttributionValues.JSON_PROPERTY_SERVERLESS_APPS_APM_USAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SERVERLESS_APPS_PERCENTAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SERVERLESS_APPS_USAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SIEM_ANALYZED_LOGS_ADD_ON_PERCENTAGE, @@ -694,13 +692,6 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_SDS_SCANNED_BYTES_USAGE = "sds_scanned_bytes_usage"; private Double sdsScannedBytesUsage; - public static final String JSON_PROPERTY_SERVERLESS_APPS_APM_PERCENTAGE = - "serverless_apps_apm_percentage"; - private Double serverlessAppsApmPercentage; - - public static final String JSON_PROPERTY_SERVERLESS_APPS_APM_USAGE = "serverless_apps_apm_usage"; - private Double serverlessAppsApmUsage; - public static final String JSON_PROPERTY_SERVERLESS_APPS_PERCENTAGE = "serverless_apps_percentage"; private Double serverlessAppsPercentage; @@ -3912,49 +3903,6 @@ public void setSdsScannedBytesUsage(Double sdsScannedBytesUsage) { this.sdsScannedBytesUsage = sdsScannedBytesUsage; } - public MonthlyUsageAttributionValues serverlessAppsApmPercentage( - Double serverlessAppsApmPercentage) { - this.serverlessAppsApmPercentage = serverlessAppsApmPercentage; - return this; - } - - /** - * The percentage of Serverless Apps APM usage by tag(s). - * - * @return serverlessAppsApmPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_APPS_APM_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getServerlessAppsApmPercentage() { - return serverlessAppsApmPercentage; - } - - public void setServerlessAppsApmPercentage(Double serverlessAppsApmPercentage) { - this.serverlessAppsApmPercentage = serverlessAppsApmPercentage; - } - - public MonthlyUsageAttributionValues serverlessAppsApmUsage(Double serverlessAppsApmUsage) { - this.serverlessAppsApmUsage = serverlessAppsApmUsage; - return this; - } - - /** - * The total Serverless Apps APM usage by tag(s). - * - * @return serverlessAppsApmUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_APPS_APM_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getServerlessAppsApmUsage() { - return serverlessAppsApmUsage; - } - - public void setServerlessAppsApmUsage(Double serverlessAppsApmUsage) { - this.serverlessAppsApmUsage = serverlessAppsApmUsage; - } - public MonthlyUsageAttributionValues serverlessAppsPercentage(Double serverlessAppsPercentage) { this.serverlessAppsPercentage = serverlessAppsPercentage; return this; @@ -4615,11 +4563,6 @@ public boolean equals(Object o) { this.sdsScannedBytesPercentage, monthlyUsageAttributionValues.sdsScannedBytesPercentage) && Objects.equals( this.sdsScannedBytesUsage, monthlyUsageAttributionValues.sdsScannedBytesUsage) - && Objects.equals( - this.serverlessAppsApmPercentage, - monthlyUsageAttributionValues.serverlessAppsApmPercentage) - && Objects.equals( - this.serverlessAppsApmUsage, monthlyUsageAttributionValues.serverlessAppsApmUsage) && Objects.equals( this.serverlessAppsPercentage, monthlyUsageAttributionValues.serverlessAppsPercentage) && Objects.equals( @@ -4808,8 +4751,6 @@ public int hashCode() { scaFargateUsage, sdsScannedBytesPercentage, sdsScannedBytesUsage, - serverlessAppsApmPercentage, - serverlessAppsApmUsage, serverlessAppsPercentage, serverlessAppsUsage, siemAnalyzedLogsAddOnPercentage, @@ -5197,12 +5138,6 @@ public String toString() { sb.append(" sdsScannedBytesUsage: ") .append(toIndentedString(sdsScannedBytesUsage)) .append("\n"); - sb.append(" serverlessAppsApmPercentage: ") - .append(toIndentedString(serverlessAppsApmPercentage)) - .append("\n"); - sb.append(" serverlessAppsApmUsage: ") - .append(toIndentedString(serverlessAppsApmUsage)) - .append("\n"); sb.append(" serverlessAppsPercentage: ") .append(toIndentedString(serverlessAppsPercentage)) .append("\n"); 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 7632101ebd2..a5b9136be1a 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 @@ -82,6 +82,9 @@ import com.datadog.api.client.v2.model.SecurityMonitoringSignalResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkAssigneeUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkStateUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsBulkTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionCreateRequest; @@ -590,6 +593,295 @@ public CompletableFuture> attachJiraIssueWithHt new GenericType() {}); } + /** + * Bulk update triage assignee of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfo}. + * + * @param body Attributes describing the signal assignee updates. (required) + * @return SecurityMonitoringSignalsBulkTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsBulkTriageUpdateResponse + bulkEditSecurityMonitoringSignalsAssignee( + SecurityMonitoringSignalsBulkAssigneeUpdateRequest body) throws ApiException { + return bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfo(body).getData(); + } + + /** + * Bulk update triage assignee of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfoAsync}. + * + * @param body Attributes describing the signal assignee updates. (required) + * @return CompletableFuture<SecurityMonitoringSignalsBulkTriageUpdateResponse> + */ + public CompletableFuture + bulkEditSecurityMonitoringSignalsAssigneeAsync( + SecurityMonitoringSignalsBulkAssigneeUpdateRequest body) { + return bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Change the triage assignees of multiple security signals at once. The maximum number of signals + * that can be updated in a single request is 199. + * + * @param body Attributes describing the signal assignee updates. (required) + * @return ApiResponse<SecurityMonitoringSignalsBulkTriageUpdateResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse + bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfo( + SecurityMonitoringSignalsBulkAssigneeUpdateRequest 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" + + " bulkEditSecurityMonitoringSignalsAssignee"); + } + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals/bulk/assignee"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.bulkEditSecurityMonitoringSignalsAssignee", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Bulk update triage assignee of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfo}. + * + * @param body Attributes describing the signal assignee updates. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalsBulkTriageUpdateResponse>> + */ + public CompletableFuture> + bulkEditSecurityMonitoringSignalsAssigneeWithHttpInfoAsync( + SecurityMonitoringSignalsBulkAssigneeUpdateRequest 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" + + " bulkEditSecurityMonitoringSignalsAssignee")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals/bulk/assignee"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.bulkEditSecurityMonitoringSignalsAssignee", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Bulk update triage state of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsStateWithHttpInfo}. + * + * @param body Attributes describing the signal state updates. (required) + * @return SecurityMonitoringSignalsBulkTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsBulkTriageUpdateResponse bulkEditSecurityMonitoringSignalsState( + SecurityMonitoringSignalsBulkStateUpdateRequest body) throws ApiException { + return bulkEditSecurityMonitoringSignalsStateWithHttpInfo(body).getData(); + } + + /** + * Bulk update triage state of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsStateWithHttpInfoAsync}. + * + * @param body Attributes describing the signal state updates. (required) + * @return CompletableFuture<SecurityMonitoringSignalsBulkTriageUpdateResponse> + */ + public CompletableFuture + bulkEditSecurityMonitoringSignalsStateAsync( + SecurityMonitoringSignalsBulkStateUpdateRequest body) { + return bulkEditSecurityMonitoringSignalsStateWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Change the triage states of multiple security signals at once. The maximum number of signals + * that can be updated in a single request is 199. + * + * @param body Attributes describing the signal state updates. (required) + * @return ApiResponse<SecurityMonitoringSignalsBulkTriageUpdateResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse + bulkEditSecurityMonitoringSignalsStateWithHttpInfo( + SecurityMonitoringSignalsBulkStateUpdateRequest 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" + + " bulkEditSecurityMonitoringSignalsState"); + } + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals/bulk/state"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.bulkEditSecurityMonitoringSignalsState", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Bulk update triage state of security signals. + * + *

See {@link #bulkEditSecurityMonitoringSignalsStateWithHttpInfo}. + * + * @param body Attributes describing the signal state updates. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalsBulkTriageUpdateResponse>> + */ + public CompletableFuture> + bulkEditSecurityMonitoringSignalsStateWithHttpInfoAsync( + SecurityMonitoringSignalsBulkStateUpdateRequest 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" + + " bulkEditSecurityMonitoringSignalsState")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals/bulk/state"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.bulkEditSecurityMonitoringSignalsState", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + /** * Bulk export security monitoring rules. * diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.java new file mode 100644 index 00000000000..fa49bcbf88a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** Attributes describing the new assignees for a bulk signal update. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.JSON_PROPERTY_ASSIGNEE, + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkAssigneeUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSIGNEE = "assignee"; + private String assignee; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNEE) String assignee) { + this.assignee = assignee; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes assignee(String assignee) { + this.assignee = assignee; + return this; + } + + /** + * UUID of the user to assign to the signal. Use an empty string to unassign. + * + * @return assignee + */ + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssignee() { + return assignee; + } + + public void setAssignee(String assignee) { + this.assignee = assignee; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * Version of the updated signal. If server side version is higher, update will be rejected. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * 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 SecurityMonitoringSignalsBulkAssigneeUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes 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 SecurityMonitoringSignalsBulkAssigneeUpdateAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes + securityMonitoringSignalsBulkAssigneeUpdateAttributes = + (SecurityMonitoringSignalsBulkAssigneeUpdateAttributes) o; + return Objects.equals( + this.assignee, securityMonitoringSignalsBulkAssigneeUpdateAttributes.assignee) + && Objects.equals( + this.version, securityMonitoringSignalsBulkAssigneeUpdateAttributes.version) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkAssigneeUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(assignee, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkAssigneeUpdateAttributes {\n"); + sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/SecurityMonitoringSignalsBulkAssigneeUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateData.java new file mode 100644 index 00000000000..720b82e370f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateData.java @@ -0,0 +1,214 @@ +/* + * 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 for updating the assignees for multiple security signals. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkAssigneeUpdateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringSignalsBulkAssigneeUpdateData.JSON_PROPERTY_ID, + SecurityMonitoringSignalsBulkAssigneeUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkAssigneeUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringSignalsBulkAssigneeUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringSignalType type = SecurityMonitoringSignalType.SIGNAL; + + public SecurityMonitoringSignalsBulkAssigneeUpdateData() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkAssigneeUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateData attributes( + SecurityMonitoringSignalsBulkAssigneeUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes describing the new assignees for a bulk signal update. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalsBulkAssigneeUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringSignalsBulkAssigneeUpdateAttributes attributes) { + this.attributes = attributes; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The unique ID of the security signal. + * + * @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 SecurityMonitoringSignalsBulkAssigneeUpdateData type(SecurityMonitoringSignalType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of event. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalType getType() { + return type; + } + + public void setType(SecurityMonitoringSignalType 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 SecurityMonitoringSignalsBulkAssigneeUpdateData + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkAssigneeUpdateData 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 SecurityMonitoringSignalsBulkAssigneeUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkAssigneeUpdateData + securityMonitoringSignalsBulkAssigneeUpdateData = + (SecurityMonitoringSignalsBulkAssigneeUpdateData) o; + return Objects.equals( + this.attributes, securityMonitoringSignalsBulkAssigneeUpdateData.attributes) + && Objects.equals(this.id, securityMonitoringSignalsBulkAssigneeUpdateData.id) + && Objects.equals(this.type, securityMonitoringSignalsBulkAssigneeUpdateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkAssigneeUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkAssigneeUpdateData {\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/SecurityMonitoringSignalsBulkAssigneeUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateRequest.java new file mode 100644 index 00000000000..a62f880ed93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkAssigneeUpdateRequest.java @@ -0,0 +1,164 @@ +/* + * 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; + +/** Request body for updating the assignee of multiple security signals. */ +@JsonPropertyOrder({SecurityMonitoringSignalsBulkAssigneeUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkAssigneeUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SecurityMonitoringSignalsBulkAssigneeUpdateRequest() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkAssigneeUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateRequest data( + List data) { + this.data = data; + for (SecurityMonitoringSignalsBulkAssigneeUpdateData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringSignalsBulkAssigneeUpdateRequest addDataItem( + SecurityMonitoringSignalsBulkAssigneeUpdateData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of signal assignee updates. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List 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 SecurityMonitoringSignalsBulkAssigneeUpdateRequest + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkAssigneeUpdateRequest 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 SecurityMonitoringSignalsBulkAssigneeUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkAssigneeUpdateRequest + securityMonitoringSignalsBulkAssigneeUpdateRequest = + (SecurityMonitoringSignalsBulkAssigneeUpdateRequest) o; + return Objects.equals(this.data, securityMonitoringSignalsBulkAssigneeUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkAssigneeUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkAssigneeUpdateRequest {\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/SecurityMonitoringSignalsBulkStateUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateData.java new file mode 100644 index 00000000000..6ddaa0a0e1f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateData.java @@ -0,0 +1,212 @@ +/* + * 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 for updating the state for multiple security signals. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkStateUpdateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringSignalsBulkStateUpdateData.JSON_PROPERTY_ID, + SecurityMonitoringSignalsBulkStateUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkStateUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringSignalStateUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringSignalType type = SecurityMonitoringSignalType.SIGNAL; + + public SecurityMonitoringSignalsBulkStateUpdateData() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkStateUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringSignalStateUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + } + + public SecurityMonitoringSignalsBulkStateUpdateData attributes( + SecurityMonitoringSignalStateUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes describing the change of state of a security signal. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalStateUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringSignalStateUpdateAttributes attributes) { + this.attributes = attributes; + } + + public SecurityMonitoringSignalsBulkStateUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The unique ID of the security signal. + * + * @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 SecurityMonitoringSignalsBulkStateUpdateData type(SecurityMonitoringSignalType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of event. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalType getType() { + return type; + } + + public void setType(SecurityMonitoringSignalType 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 SecurityMonitoringSignalsBulkStateUpdateData + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkStateUpdateData 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 SecurityMonitoringSignalsBulkStateUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkStateUpdateData securityMonitoringSignalsBulkStateUpdateData = + (SecurityMonitoringSignalsBulkStateUpdateData) o; + return Objects.equals(this.attributes, securityMonitoringSignalsBulkStateUpdateData.attributes) + && Objects.equals(this.id, securityMonitoringSignalsBulkStateUpdateData.id) + && Objects.equals(this.type, securityMonitoringSignalsBulkStateUpdateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkStateUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkStateUpdateData {\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/SecurityMonitoringSignalsBulkStateUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateRequest.java new file mode 100644 index 00000000000..f09ec83ac52 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkStateUpdateRequest.java @@ -0,0 +1,162 @@ +/* + * 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; + +/** Request body for updating the triage states of multiple security signals. */ +@JsonPropertyOrder({SecurityMonitoringSignalsBulkStateUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkStateUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SecurityMonitoringSignalsBulkStateUpdateRequest() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkStateUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public SecurityMonitoringSignalsBulkStateUpdateRequest data( + List data) { + this.data = data; + for (SecurityMonitoringSignalsBulkStateUpdateData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringSignalsBulkStateUpdateRequest addDataItem( + SecurityMonitoringSignalsBulkStateUpdateData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of signal state updates. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List 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 SecurityMonitoringSignalsBulkStateUpdateRequest + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkStateUpdateRequest 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 SecurityMonitoringSignalsBulkStateUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkStateUpdateRequest + securityMonitoringSignalsBulkStateUpdateRequest = + (SecurityMonitoringSignalsBulkStateUpdateRequest) o; + return Objects.equals(this.data, securityMonitoringSignalsBulkStateUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkStateUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkStateUpdateRequest {\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/SecurityMonitoringSignalsBulkTriageEvent.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEvent.java new file mode 100644 index 00000000000..ea9475b87ac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEvent.java @@ -0,0 +1,180 @@ +/* + * 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; + +/** A single signal event entry in a bulk triage update response. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkTriageEvent.JSON_PROPERTY_EVENT, + SecurityMonitoringSignalsBulkTriageEvent.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkTriageEvent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT = "event"; + private SecurityMonitoringSignalsBulkTriageEventAttributes event; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public SecurityMonitoringSignalsBulkTriageEvent() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkTriageEvent( + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT) + SecurityMonitoringSignalsBulkTriageEventAttributes event, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.event = event; + this.unparsed |= event.unparsed; + this.id = id; + } + + public SecurityMonitoringSignalsBulkTriageEvent event( + SecurityMonitoringSignalsBulkTriageEventAttributes event) { + this.event = event; + this.unparsed |= event.unparsed; + return this; + } + + /** + * Triage attributes of a security signal returned in a bulk update response. + * + * @return event + */ + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalsBulkTriageEventAttributes getEvent() { + return event; + } + + public void setEvent(SecurityMonitoringSignalsBulkTriageEventAttributes event) { + this.event = event; + } + + public SecurityMonitoringSignalsBulkTriageEvent id(String id) { + this.id = id; + return this; + } + + /** + * The unique ID of the security signal. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * 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 SecurityMonitoringSignalsBulkTriageEvent + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkTriageEvent 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 SecurityMonitoringSignalsBulkTriageEvent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkTriageEvent securityMonitoringSignalsBulkTriageEvent = + (SecurityMonitoringSignalsBulkTriageEvent) o; + return Objects.equals(this.event, securityMonitoringSignalsBulkTriageEvent.event) + && Objects.equals(this.id, securityMonitoringSignalsBulkTriageEvent.id) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkTriageEvent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(event, id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkTriageEvent {\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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/SecurityMonitoringSignalsBulkTriageEventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEventAttributes.java new file mode 100644 index 00000000000..45d38239431 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageEventAttributes.java @@ -0,0 +1,455 @@ +/* + * 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; + +/** Triage attributes of a security signal returned in a bulk update response. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ARCHIVE_COMMENT, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ARCHIVE_COMMENT_USER, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ARCHIVE_REASON, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ASSIGNEE, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_ID, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_INCIDENT_IDS, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_STATE, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_STATE_UPDATE_TIMESTAMP, + SecurityMonitoringSignalsBulkTriageEventAttributes.JSON_PROPERTY_STATE_UPDATE_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkTriageEventAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ARCHIVE_COMMENT = "archive_comment"; + private String archiveComment; + + public static final String JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP = "archive_comment_timestamp"; + private Long archiveCommentTimestamp; + + public static final String JSON_PROPERTY_ARCHIVE_COMMENT_USER = "archive_comment_user"; + private SecurityMonitoringTriageUser archiveCommentUser; + + public static final String JSON_PROPERTY_ARCHIVE_REASON = "archive_reason"; + private SecurityMonitoringSignalArchiveReason archiveReason; + + public static final String JSON_PROPERTY_ASSIGNEE = "assignee"; + private SecurityMonitoringTriageUser assignee; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INCIDENT_IDS = "incident_ids"; + private List incidentIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATE = "state"; + private SecurityMonitoringSignalState state; + + public static final String JSON_PROPERTY_STATE_UPDATE_TIMESTAMP = "state_update_timestamp"; + private Long stateUpdateTimestamp; + + public static final String JSON_PROPERTY_STATE_UPDATE_USER = "state_update_user"; + private SecurityMonitoringTriageUser stateUpdateUser; + + public SecurityMonitoringSignalsBulkTriageEventAttributes() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkTriageEventAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNEE) + SecurityMonitoringTriageUser assignee, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_IDS) List incidentIds, + @JsonProperty(required = true, value = JSON_PROPERTY_STATE) + SecurityMonitoringSignalState state) { + this.assignee = assignee; + this.unparsed |= assignee.unparsed; + this.id = id; + this.incidentIds = incidentIds; + this.state = state; + this.unparsed |= !state.isValid(); + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes archiveComment(String archiveComment) { + this.archiveComment = archiveComment; + return this; + } + + /** + * Optional comment to display on archived signals. + * + * @return archiveComment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getArchiveComment() { + return archiveComment; + } + + public void setArchiveComment(String archiveComment) { + this.archiveComment = archiveComment; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes archiveCommentTimestamp( + Long archiveCommentTimestamp) { + this.archiveCommentTimestamp = archiveCommentTimestamp; + return this; + } + + /** + * Timestamp of the last edit to the archive comment. + * + * @return archiveCommentTimestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getArchiveCommentTimestamp() { + return archiveCommentTimestamp; + } + + public void setArchiveCommentTimestamp(Long archiveCommentTimestamp) { + this.archiveCommentTimestamp = archiveCommentTimestamp; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes archiveCommentUser( + SecurityMonitoringTriageUser archiveCommentUser) { + this.archiveCommentUser = archiveCommentUser; + this.unparsed |= archiveCommentUser.unparsed; + return this; + } + + /** + * Object representing a given user entity. + * + * @return archiveCommentUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringTriageUser getArchiveCommentUser() { + return archiveCommentUser; + } + + public void setArchiveCommentUser(SecurityMonitoringTriageUser archiveCommentUser) { + this.archiveCommentUser = archiveCommentUser; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes archiveReason( + SecurityMonitoringSignalArchiveReason archiveReason) { + this.archiveReason = archiveReason; + this.unparsed |= !archiveReason.isValid(); + return this; + } + + /** + * Reason a signal is archived. + * + * @return archiveReason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalArchiveReason getArchiveReason() { + return archiveReason; + } + + public void setArchiveReason(SecurityMonitoringSignalArchiveReason archiveReason) { + if (!archiveReason.isValid()) { + this.unparsed = true; + } + this.archiveReason = archiveReason; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes assignee( + SecurityMonitoringTriageUser assignee) { + this.assignee = assignee; + this.unparsed |= assignee.unparsed; + return this; + } + + /** + * Object representing a given user entity. + * + * @return assignee + */ + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringTriageUser getAssignee() { + return assignee; + } + + public void setAssignee(SecurityMonitoringTriageUser assignee) { + this.assignee = assignee; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes id(String id) { + this.id = id; + return this; + } + + /** + * The unique ID of the security signal. + * + * @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 SecurityMonitoringSignalsBulkTriageEventAttributes incidentIds(List incidentIds) { + this.incidentIds = incidentIds; + return this; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes addIncidentIdsItem( + Long incidentIdsItem) { + this.incidentIds.add(incidentIdsItem); + return this; + } + + /** + * Array of incidents that are associated with this signal. + * + * @return incidentIds + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getIncidentIds() { + return incidentIds; + } + + public void setIncidentIds(List incidentIds) { + this.incidentIds = incidentIds; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes state( + SecurityMonitoringSignalState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * The new triage state of the signal. + * + * @return state + */ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalState getState() { + return state; + } + + public void setState(SecurityMonitoringSignalState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes stateUpdateTimestamp( + Long stateUpdateTimestamp) { + this.stateUpdateTimestamp = stateUpdateTimestamp; + return this; + } + + /** + * Timestamp of the last state update. + * + * @return stateUpdateTimestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_UPDATE_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getStateUpdateTimestamp() { + return stateUpdateTimestamp; + } + + public void setStateUpdateTimestamp(Long stateUpdateTimestamp) { + this.stateUpdateTimestamp = stateUpdateTimestamp; + } + + public SecurityMonitoringSignalsBulkTriageEventAttributes stateUpdateUser( + SecurityMonitoringTriageUser stateUpdateUser) { + this.stateUpdateUser = stateUpdateUser; + this.unparsed |= stateUpdateUser.unparsed; + return this; + } + + /** + * Object representing a given user entity. + * + * @return stateUpdateUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_UPDATE_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringTriageUser getStateUpdateUser() { + return stateUpdateUser; + } + + public void setStateUpdateUser(SecurityMonitoringTriageUser stateUpdateUser) { + this.stateUpdateUser = stateUpdateUser; + } + + /** + * 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 SecurityMonitoringSignalsBulkTriageEventAttributes + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkTriageEventAttributes 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 SecurityMonitoringSignalsBulkTriageEventAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkTriageEventAttributes + securityMonitoringSignalsBulkTriageEventAttributes = + (SecurityMonitoringSignalsBulkTriageEventAttributes) o; + return Objects.equals( + this.archiveComment, securityMonitoringSignalsBulkTriageEventAttributes.archiveComment) + && Objects.equals( + this.archiveCommentTimestamp, + securityMonitoringSignalsBulkTriageEventAttributes.archiveCommentTimestamp) + && Objects.equals( + this.archiveCommentUser, + securityMonitoringSignalsBulkTriageEventAttributes.archiveCommentUser) + && Objects.equals( + this.archiveReason, securityMonitoringSignalsBulkTriageEventAttributes.archiveReason) + && Objects.equals( + this.assignee, securityMonitoringSignalsBulkTriageEventAttributes.assignee) + && Objects.equals(this.id, securityMonitoringSignalsBulkTriageEventAttributes.id) + && Objects.equals( + this.incidentIds, securityMonitoringSignalsBulkTriageEventAttributes.incidentIds) + && Objects.equals(this.state, securityMonitoringSignalsBulkTriageEventAttributes.state) + && Objects.equals( + this.stateUpdateTimestamp, + securityMonitoringSignalsBulkTriageEventAttributes.stateUpdateTimestamp) + && Objects.equals( + this.stateUpdateUser, + securityMonitoringSignalsBulkTriageEventAttributes.stateUpdateUser) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkTriageEventAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + archiveComment, + archiveCommentTimestamp, + archiveCommentUser, + archiveReason, + assignee, + id, + incidentIds, + state, + stateUpdateTimestamp, + stateUpdateUser, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkTriageEventAttributes {\n"); + sb.append(" archiveComment: ").append(toIndentedString(archiveComment)).append("\n"); + sb.append(" archiveCommentTimestamp: ") + .append(toIndentedString(archiveCommentTimestamp)) + .append("\n"); + sb.append(" archiveCommentUser: ").append(toIndentedString(archiveCommentUser)).append("\n"); + sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); + sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" incidentIds: ").append(toIndentedString(incidentIds)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" stateUpdateTimestamp: ") + .append(toIndentedString(stateUpdateTimestamp)) + .append("\n"); + sb.append(" stateUpdateUser: ").append(toIndentedString(stateUpdateUser)).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/SecurityMonitoringSignalsBulkTriageUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResponse.java new file mode 100644 index 00000000000..2d07667136b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResponse.java @@ -0,0 +1,210 @@ +/* + * 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; + +/** Response for a bulk triage update of security signals. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkTriageUpdateResponse.JSON_PROPERTY_RESULT, + SecurityMonitoringSignalsBulkTriageUpdateResponse.JSON_PROPERTY_STATUS, + SecurityMonitoringSignalsBulkTriageUpdateResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkTriageUpdateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESULT = "result"; + private SecurityMonitoringSignalsBulkTriageUpdateResult result; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public SecurityMonitoringSignalsBulkTriageUpdateResponse() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkTriageUpdateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_RESULT) + SecurityMonitoringSignalsBulkTriageUpdateResult result, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.result = result; + this.unparsed |= result.unparsed; + this.status = status; + this.type = type; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResponse result( + SecurityMonitoringSignalsBulkTriageUpdateResult result) { + this.result = result; + this.unparsed |= result.unparsed; + return this; + } + + /** + * The result payload of a bulk signal triage update. + * + * @return result + */ + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalsBulkTriageUpdateResult getResult() { + return result; + } + + public void setResult(SecurityMonitoringSignalsBulkTriageUpdateResult result) { + this.result = result; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the bulk operation. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResponse type(String type) { + this.type = type; + return this; + } + + /** + * The type of the response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 SecurityMonitoringSignalsBulkTriageUpdateResponse + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkTriageUpdateResponse 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 SecurityMonitoringSignalsBulkTriageUpdateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkTriageUpdateResponse + securityMonitoringSignalsBulkTriageUpdateResponse = + (SecurityMonitoringSignalsBulkTriageUpdateResponse) o; + return Objects.equals(this.result, securityMonitoringSignalsBulkTriageUpdateResponse.result) + && Objects.equals(this.status, securityMonitoringSignalsBulkTriageUpdateResponse.status) + && Objects.equals(this.type, securityMonitoringSignalsBulkTriageUpdateResponse.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkTriageUpdateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(result, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkTriageUpdateResponse {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/SecurityMonitoringSignalsBulkTriageUpdateResult.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResult.java new file mode 100644 index 00000000000..b4b06e78b56 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsBulkTriageUpdateResult.java @@ -0,0 +1,192 @@ +/* + * 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; + +/** The result payload of a bulk signal triage update. */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsBulkTriageUpdateResult.JSON_PROPERTY_COUNT, + SecurityMonitoringSignalsBulkTriageUpdateResult.JSON_PROPERTY_EVENTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSignalsBulkTriageUpdateResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COUNT = "count"; + private Long count; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = new ArrayList<>(); + + public SecurityMonitoringSignalsBulkTriageUpdateResult() {} + + @JsonCreator + public SecurityMonitoringSignalsBulkTriageUpdateResult( + @JsonProperty(required = true, value = JSON_PROPERTY_COUNT) Long count, + @JsonProperty(required = true, value = JSON_PROPERTY_EVENTS) + List events) { + this.count = count; + this.events = events; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResult count(Long count) { + this.count = count; + return this; + } + + /** + * The number of signals updated. + * + * @return count + */ + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResult events( + List events) { + this.events = events; + for (SecurityMonitoringSignalsBulkTriageEvent item : events) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringSignalsBulkTriageUpdateResult addEventsItem( + SecurityMonitoringSignalsBulkTriageEvent eventsItem) { + this.events.add(eventsItem); + this.unparsed |= eventsItem.unparsed; + return this; + } + + /** + * The list of updated signals. + * + * @return events + */ + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + /** + * 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 SecurityMonitoringSignalsBulkTriageUpdateResult + */ + @JsonAnySetter + public SecurityMonitoringSignalsBulkTriageUpdateResult 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 SecurityMonitoringSignalsBulkTriageUpdateResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSignalsBulkTriageUpdateResult + securityMonitoringSignalsBulkTriageUpdateResult = + (SecurityMonitoringSignalsBulkTriageUpdateResult) o; + return Objects.equals(this.count, securityMonitoringSignalsBulkTriageUpdateResult.count) + && Objects.equals(this.events, securityMonitoringSignalsBulkTriageUpdateResult.events) + && Objects.equals( + this.additionalProperties, + securityMonitoringSignalsBulkTriageUpdateResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(count, events, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSignalsBulkTriageUpdateResult {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).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/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 5695a7ea4a5..791d52de646 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 @@ -121,6 +121,36 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk update triage assignee of security signals returns "Bad Request" response + Given operation "BulkEditSecurityMonitoringSignalsAssignee" enabled + And new "BulkEditSecurityMonitoringSignalsAssignee" request + And body with value {"data": [{"attributes": {}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk update triage assignee of security signals returns "OK" response + Given new "BulkEditSecurityMonitoringSignalsAssignee" request + And body with value {"data": [{"attributes": {"assignee": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]} + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk update triage state of security signals returns "Bad Request" response + Given operation "BulkEditSecurityMonitoringSignalsState" enabled + And new "BulkEditSecurityMonitoringSignalsState" request + And body with value {"data": [{"attributes": {}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk update triage state of security signals returns "OK" response + Given new "BulkEditSecurityMonitoringSignalsState" request + And body with value {"data": [{"attributes": {"archive_reason": "none", "state": "open"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]} + When the request is sent + Then the response status is 200 OK + @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "Bad Request" response Given operation "CancelThreatHuntingJob" enabled 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 29b9dc1ab27..f18461244ec 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 @@ -5229,6 +5229,18 @@ "type": "safe" } }, + "BulkEditSecurityMonitoringSignalsAssignee": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "BulkEditSecurityMonitoringSignalsState": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "SearchSecurityMonitoringSignals": { "tag": "Security Monitoring", "undo": {