diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 6bc8997cfde..05ce562f5e2 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -5270,6 +5270,79 @@ components:
example: _latest
type: string
type: object
+ AttachCaseRequest:
+ description: Request for attaching security findings to a case.
+ properties:
+ data:
+ $ref: '#/components/schemas/AttachCaseRequestData'
+ type: object
+ AttachCaseRequestData:
+ description: Data of the case to attach security findings to.
+ properties:
+ id:
+ description: The unique identifier of the case.
+ example: c1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ relationships:
+ $ref: '#/components/schemas/AttachCaseRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/CaseDataType'
+ required:
+ - type
+ - id
+ type: object
+ AttachCaseRequestDataRelationships:
+ description: Relationships of the case to attach security findings to.
+ properties:
+ findings:
+ $ref: '#/components/schemas/Findings'
+ description: Security findings to attach to the case.
+ required:
+ - findings
+ type: object
+ AttachJiraIssueRequest:
+ description: Request for attaching security findings to a Jira issue.
+ properties:
+ data:
+ $ref: '#/components/schemas/AttachJiraIssueRequestData'
+ type: object
+ AttachJiraIssueRequestData:
+ description: Data of the Jira issue to attach security findings to.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AttachJiraIssueRequestDataAttributes'
+ id:
+ description: The unique identifier of the Jira issue attachment request.
+ example: j1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ relationships:
+ $ref: '#/components/schemas/AttachJiraIssueRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/JiraIssuesDataType'
+ required:
+ - type
+ type: object
+ AttachJiraIssueRequestDataAttributes:
+ description: Attributes of the Jira issue to attach security findings to.
+ properties:
+ jira_issue_url:
+ description: The URL of the Jira issue to attach security findings to.
+ example: https://domain.atlassian.net/browse/PROJ-123
+ type: string
+ required:
+ - jira_issue_url
+ type: object
+ AttachJiraIssueRequestDataRelationships:
+ description: Relationships of the Jira issue to attach security findings to.
+ properties:
+ findings:
+ $ref: '#/components/schemas/Findings'
+ project:
+ $ref: '#/components/schemas/CaseManagementProject'
+ required:
+ - findings
+ - project
+ type: object
AuditLogsEvent:
description: Object description of an Audit Logs event after it is processed
and stored by Datadog.
@@ -8942,6 +9015,15 @@ components:
required:
- data
type: object
+ CaseDataType:
+ default: cases
+ description: Cases resource type.
+ enum:
+ - cases
+ example: cases
+ type: string
+ x-enum-varnames:
+ - CASES
CaseEmpty:
description: Case empty request data
properties:
@@ -8958,6 +9040,53 @@ components:
required:
- data
type: object
+ CaseInsightsItems:
+ description: An insight of the case.
+ properties:
+ ref:
+ description: The reference of the insight.
+ example: /security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static
+ type: string
+ resource_id:
+ description: The unique identifier of the resource. For example, the unique
+ identifier of a security finding.
+ example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==
+ type: string
+ type:
+ description: The type of the resource. For example, the type of a security
+ finding is "SECURITY_FINDING".
+ example: SECURITY_FINDING
+ type: string
+ type: object
+ CaseManagementProject:
+ description: Case management project.
+ properties:
+ data:
+ $ref: '#/components/schemas/CaseManagementProjectData'
+ required:
+ - data
+ type: object
+ CaseManagementProjectData:
+ properties:
+ id:
+ description: The unique identifier of the case management project.
+ example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
+ type: string
+ type:
+ $ref: '#/components/schemas/CaseManagementProjectDataType'
+ required:
+ - type
+ - id
+ type: object
+ CaseManagementProjectDataType:
+ default: projects
+ description: Projects resource type.
+ enum:
+ - projects
+ example: projects
+ type: string
+ x-enum-varnames:
+ - PROJECTS
CaseObjectAttributes:
additionalProperties:
items:
@@ -12602,6 +12731,68 @@ components:
required:
- type
type: object
+ CreateCaseRequestArray:
+ description: List of requests to create cases for security findings.
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/CreateCaseRequestData'
+ type: array
+ required:
+ - data
+ type: object
+ CreateCaseRequestData:
+ description: Data of the case to create.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateCaseRequestDataAttributes'
+ id:
+ description: The unique identifier of the case.
+ example: c1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ relationships:
+ $ref: '#/components/schemas/CreateCaseRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/CaseDataType'
+ required:
+ - type
+ type: object
+ CreateCaseRequestDataAttributes:
+ description: Attributes of the case to create.
+ properties:
+ assignee_id:
+ description: The unique identifier of the user assigned to the case.
+ example: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0
+ type: string
+ description:
+ description: The description of the case. If not provided, the description
+ will be automatically generated.
+ example: A description of the case.
+ type: string
+ priority:
+ $ref: '#/components/schemas/CasePriority'
+ description: The priority of the case. If not provided, the priority will
+ be automatically set to "NOT_DEFINED".
+ example: P4
+ title:
+ description: The title of the case. If not provided, the title will be automatically
+ generated.
+ example: A title for the case.
+ type: string
+ type: object
+ CreateCaseRequestDataRelationships:
+ description: Relationships of the case to create.
+ properties:
+ findings:
+ $ref: '#/components/schemas/Findings'
+ description: Security findings of the case to create.
+ project:
+ $ref: '#/components/schemas/CaseManagementProject'
+ description: Project of the case to create.
+ required:
+ - findings
+ - project
+ type: object
CreateConnectionRequest:
example:
data:
@@ -12873,6 +13064,89 @@ components:
required:
- data
type: object
+ CreateJiraIssueRequestArray:
+ description: List of requests to create Jira issues for security findings.
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/CreateJiraIssueRequestData'
+ type: array
+ included:
+ items:
+ $ref: '#/components/schemas/CreateJiraIssueRequestArrayIncluded'
+ type: array
+ required:
+ - data
+ type: object
+ CreateJiraIssueRequestArrayIncluded:
+ description: 'Attributes and relationships of the case linked to the Jira issue.
+ Should contain all of the following: case, project, and security findings.'
+ oneOf:
+ - $ref: '#/components/schemas/CreateCaseRequestData'
+ - $ref: '#/components/schemas/CaseManagementProjectData'
+ - $ref: '#/components/schemas/FindingData'
+ CreateJiraIssueRequestData:
+ description: Data of the Jira issue to create.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateJiraIssueRequestDataAttributes'
+ id:
+ description: The unique identifier of the Jira issue creation request.
+ example: j1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ relationships:
+ $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/JiraIssuesDataType'
+ required:
+ - type
+ type: object
+ CreateJiraIssueRequestDataAttributes:
+ description: Attributes of the Jira issue to create.
+ properties:
+ fields:
+ $ref: '#/components/schemas/CreateJiraIssueRequestDataAttributesFields'
+ type: object
+ CreateJiraIssueRequestDataAttributesFields:
+ description: Custom fields of the Jira issue to create. For the list of available
+ fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get).
+ properties:
+ fields:
+ example:
+ customfield_10001: Value 1
+ customfield_10002:
+ - Value 2
+ - Value 3
+ type: object
+ type: object
+ CreateJiraIssueRequestDataRelationships:
+ description: Relationships of the Jira issue to create.
+ properties:
+ case:
+ $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationshipsCase'
+ required:
+ - case
+ type: object
+ CreateJiraIssueRequestDataRelationshipsCase:
+ description: Case linked to the Jira issue.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationshipsCaseData'
+ required:
+ - data
+ type: object
+ CreateJiraIssueRequestDataRelationshipsCaseData:
+ description: Case linked to the Jira issue.
+ properties:
+ id:
+ example: c1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ type:
+ $ref: '#/components/schemas/CaseDataType'
+ required:
+ - type
+ - id
+ type: object
CreateNotificationRuleParameters:
description: Body of the notification rule create request.
properties:
@@ -16862,6 +17136,35 @@ components:
oneOf:
- $ref: '#/components/schemas/DeploymentRuleOptionsFaultyDeploymentDetection'
- $ref: '#/components/schemas/DeploymentRuleOptionsMonitor'
+ DetachCaseRequest:
+ description: Request for detaching security findings from their case.
+ properties:
+ data:
+ $ref: '#/components/schemas/DetachCaseRequestData'
+ type: object
+ DetachCaseRequestData:
+ description: Data for detaching security findings from their case.
+ properties:
+ id:
+ description: The unique identifier of the detachment request.
+ example: f8b9e3b1-24ec-4413-8be5-1b12b98533c6
+ type: string
+ relationships:
+ $ref: '#/components/schemas/DetachCaseRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/CaseDataType'
+ required:
+ - type
+ type: object
+ DetachCaseRequestDataRelationships:
+ description: Relationships detaching security findings from their case.
+ properties:
+ findings:
+ $ref: '#/components/schemas/Findings'
+ description: Security findings to detach from their case.
+ required:
+ - findings
+ type: object
DetailedFinding:
description: A single finding with with message and resource configuration.
properties:
@@ -20712,6 +21015,153 @@ components:
vulnerability_type:
$ref: '#/components/schemas/FindingVulnerabilityType'
type: object
+ FindingCaseResponse:
+ description: Case response.
+ properties:
+ data:
+ $ref: '#/components/schemas/FindingCaseResponseData'
+ type: object
+ FindingCaseResponseArray:
+ description: List of case responses.
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/FindingCaseResponseData'
+ type: array
+ required:
+ - data
+ type: object
+ FindingCaseResponseData:
+ description: Data of the case.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/FindingCaseResponseDataAttributes'
+ id:
+ description: The unique identifier of the case.
+ example: c1234567-89ab-cdef-0123-456789abcdef
+ type: string
+ relationships:
+ $ref: '#/components/schemas/FindingCaseResponseDataRelationships'
+ type:
+ $ref: '#/components/schemas/CaseDataType'
+ required:
+ - type
+ type: object
+ FindingCaseResponseDataAttributes:
+ description: Attributes of the case.
+ properties:
+ archived_at:
+ description: Timestamp of when the case was archived.
+ example: '2025-01-01T00:00:00.000Z'
+ format: date-time
+ type: string
+ assigned_to:
+ $ref: '#/components/schemas/RelationshipToUser'
+ description: User assigned to the case.
+ attributes:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ type: object
+ closed_at:
+ description: Timestamp of when the case was closed.
+ example: '2025-01-01T00:00:00.000Z'
+ format: date-time
+ type: string
+ created_at:
+ description: Timestamp of when the case was created.
+ example: '2025-01-01T00:00:00.000Z'
+ format: date-time
+ type: string
+ creation_source:
+ description: Source of the case creation.
+ example: CS_SECURITY_FINDING
+ type: string
+ description:
+ description: Description of the case.
+ example: A description of the case.
+ type: string
+ due_date:
+ description: Due date of the case.
+ example: '2025-01-01'
+ type: string
+ insights:
+ description: Insights of the case.
+ items:
+ $ref: '#/components/schemas/CaseInsightsItems'
+ type: array
+ jira_issue:
+ $ref: '#/components/schemas/FindingJiraIssue'
+ description: Jira issue associated with the case.
+ key:
+ description: Key of the case.
+ example: PROJ-123
+ type: string
+ modified_at:
+ description: Timestamp of when the case was last modified.
+ example: '2025-01-01T00:00:00.000Z'
+ format: date-time
+ type: string
+ priority:
+ description: Priority of the case.
+ example: P4
+ type: string
+ status:
+ description: Status of the case.
+ example: OPEN
+ type: string
+ status_group:
+ description: Status group of the case.
+ example: SG_OPEN
+ type: string
+ status_name:
+ description: Status name of the case.
+ example: Open
+ type: string
+ title:
+ description: Title of the case.
+ example: A title for the case.
+ type: string
+ type:
+ description: Type of the case. For security cases, this is always "SECURITY".
+ example: SECURITY
+ type: string
+ type: object
+ FindingCaseResponseDataRelationships:
+ description: Relationships of the case.
+ properties:
+ created_by:
+ $ref: '#/components/schemas/RelationshipToUser'
+ description: User who created the case.
+ modified_by:
+ $ref: '#/components/schemas/RelationshipToUser'
+ description: User who last modified the case.
+ project:
+ $ref: '#/components/schemas/CaseManagementProject'
+ description: Project in which the case was created.
+ type: object
+ FindingData:
+ properties:
+ id:
+ description: The unique identifier of the security finding.
+ example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==
+ type: string
+ type:
+ $ref: '#/components/schemas/FindingDataType'
+ required:
+ - type
+ - id
+ type: object
+ FindingDataType:
+ default: findings
+ description: Security findings resource type.
+ enum:
+ - findings
+ example: findings
+ type: string
+ x-enum-varnames:
+ - FINDINGS
FindingDatadogLink:
description: The Datadog relative link for this finding.
example: /security/compliance?panels=cpfinding%7Cevent%7CruleId%3Adef-000-u5t%7CresourceId%3Ae8c9ab7c52ebd7bf2fdb4db641082d7d%7CtabId%3Aoverview
@@ -20753,6 +21203,42 @@ components:
description: The unique ID for this finding.
example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==
type: string
+ FindingJiraIssue:
+ description: Jira issue associated with the case.
+ properties:
+ error_message:
+ description: The error message if the Jira issue creation failed.
+ example: '{"errorMessages":["An error occured."],"errors":{}}'
+ type: string
+ result:
+ $ref: '#/components/schemas/FindingJiraIssueResult'
+ status:
+ description: The status of the Jira issue creation. Can be "COMPLETED" if
+ the Jira issue was created successfully, or "FAILED" if the Jira issue
+ creation failed.
+ example: COMPLETED
+ type: string
+ type: object
+ FindingJiraIssueResult:
+ description: Result of the Jira issue creation.
+ properties:
+ account_id:
+ description: The account ID of the Jira issue.
+ example: 463a8631-680e-455c-bfd3-3ed04d326eb7
+ type: string
+ issue_id:
+ description: The unique identifier of the Jira issue.
+ example: '2871276'
+ type: string
+ issue_key:
+ description: The key of the Jira issue.
+ example: PROJ-123
+ type: string
+ issue_url:
+ description: The URL of the Jira issue.
+ example: https://domain.atlassian.net/browse/PROJ-123
+ type: string
+ type: object
FindingMute:
additionalProperties: false
description: Information about the mute status of this finding.
@@ -20878,6 +21364,14 @@ components:
- ATTACK_PATH
- IDENTITY_RISK
- API_SECURITY
+ Findings:
+ description: A list of security findings.
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/FindingData'
+ type: array
+ type: object
FlakyTest:
description: A flaky test object.
properties:
@@ -28295,6 +28789,15 @@ components:
description: Jira project key
type: string
type: object
+ JiraIssuesDataType:
+ default: jira_issues
+ description: Jira issues resource type.
+ enum:
+ - jira_issues
+ example: jira_issues
+ type: string
+ x-enum-varnames:
+ - JIRA_ISSUES
JobCreateResponse:
description: Run a threat hunting job response.
properties:
@@ -74543,10 +75046,16 @@ paths:
security:
- apiKeyAuth: []
appKeyAuth: []
+ - AuthZ: []
summary: Mute or unmute a batch of findings
tags:
- Security Monitoring
x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
x-unstable: '**Note**: This endpoint is in public beta.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
@@ -78230,6 +78739,208 @@ paths:
operator: OR
permissions:
- security_monitoring_cws_agent_rules_read
+ /api/v2/security/findings/cases:
+ delete:
+ description: Detach security findings from their case. This operation dissociates
+ security findings from their associated cases without deleting the cases themselves.
+ You can detach security findings from multiple different cases in a single
+ request, with a limit of 50 security findings per request. Security findings
+ that are not currently attached to any case will be ignored.
+ operationId: DetachCase
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DetachCaseRequest'
+ required: true
+ responses:
+ '204':
+ description: No Content
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Detach security findings from their case
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
+ post:
+ description: Create cases for security findings. You can create up to 50 cases
+ per request and associate up to 50 security findings per case. Security findings
+ that are already attached to another case will be detached from their previous
+ case and attached to the newly created case.
+ operationId: CreateCases
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateCaseRequestArray'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingCaseResponseArray'
+ description: Created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create cases for security findings
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
+ /api/v2/security/findings/cases/{case_id}:
+ patch:
+ description: Attach security findings to a case. You can attach up to 50 security
+ findings per case. Security findings that are already attached to another
+ case will be detached from their previous case and attached to the specified
+ case.
+ operationId: AttachCase
+ parameters:
+ - description: The unique identifier of the case to attach security findings
+ to
+ in: path
+ name: case_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AttachCaseRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingCaseResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Attach security findings to a case
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
+ /api/v2/security/findings/jira_issues:
+ patch:
+ description: Attach security findings to a Jira issue by providing the Jira
+ issue URL. You can attach up to 50 security findings per Jira issue. If the
+ Jira issue is not linked to any case, this operation will create a case for
+ the security findings and link the Jira issue to the newly created case. Security
+ findings that are already attached to another Jira issue will be detached
+ from their previous Jira issue and attached to the specified Jira issue.
+ operationId: AttachJiraIssue
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AttachJiraIssueRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingCaseResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Attach security findings to a Jira issue
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
+ post:
+ description: Create Jira issues for security findings. This operation creates
+ a case in Datadog and a Jira issue linked to that case for bidirectional sync
+ between Datadog and Jira. You can create up to 50 Jira issues per request
+ and associate up to 50 security findings per Jira issue. Security findings
+ that are already attached to another Jira issue will be detached from their
+ previous Jira issue and attached to the newly created Jira issue.
+ operationId: CreateJiraIssues
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateJiraIssueRequestArray'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingCaseResponseArray'
+ description: Created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create Jira issues for security findings
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - security_monitoring_findings_write
+ - appsec_vm_write
/api/v2/security/sboms:
get:
description: 'Get a list of assets SBOMs for an organization.
diff --git a/examples/v2/security-monitoring/AttachCase.java b/examples/v2/security-monitoring/AttachCase.java
new file mode 100644
index 00000000000..1e9cf00c696
--- /dev/null
+++ b/examples/v2/security-monitoring/AttachCase.java
@@ -0,0 +1,54 @@
+// Attach security findings to a case 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.AttachCaseRequest;
+import com.datadog.api.client.v2.model.AttachCaseRequestData;
+import com.datadog.api.client.v2.model.AttachCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.CaseDataType;
+import com.datadog.api.client.v2.model.FindingCaseResponse;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Arrays;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ AttachCaseRequest body =
+ new AttachCaseRequest()
+ .data(
+ new AttachCaseRequestData()
+ .id("7d16945b-baf8-411e-ab2a-20fe43af1ea3")
+ .relationships(
+ new AttachCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Arrays.asList(
+ new FindingData()
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")
+ .type(FindingDataType.FINDINGS),
+ new FindingData()
+ .id(
+ "MmUzMzZkODQ2YTI3NDU0OTk4NDk3NzhkOTY5YjU2Zjh-YWJjZGI1ODI4OTYzNWM3ZmUwZTBlOWRkYTRiMGUyOGQ=")
+ .type(FindingDataType.FINDINGS)))))
+ .type(CaseDataType.CASES));
+
+ try {
+ FindingCaseResponse result =
+ apiInstance.attachCase("7d16945b-baf8-411e-ab2a-20fe43af1ea3", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#attachCase");
+ 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/AttachCase_897782765.java b/examples/v2/security-monitoring/AttachCase_897782765.java
new file mode 100644
index 00000000000..a21b965fffb
--- /dev/null
+++ b/examples/v2/security-monitoring/AttachCase_897782765.java
@@ -0,0 +1,50 @@
+// Attach security finding to a case 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.AttachCaseRequest;
+import com.datadog.api.client.v2.model.AttachCaseRequestData;
+import com.datadog.api.client.v2.model.AttachCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.CaseDataType;
+import com.datadog.api.client.v2.model.FindingCaseResponse;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ AttachCaseRequest body =
+ new AttachCaseRequest()
+ .data(
+ new AttachCaseRequestData()
+ .id("7d16945b-baf8-411e-ab2a-20fe43af1ea3")
+ .relationships(
+ new AttachCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")
+ .type(FindingDataType.FINDINGS)))))
+ .type(CaseDataType.CASES));
+
+ try {
+ FindingCaseResponse result =
+ apiInstance.attachCase("7d16945b-baf8-411e-ab2a-20fe43af1ea3", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#attachCase");
+ 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/AttachJiraIssue.java b/examples/v2/security-monitoring/AttachJiraIssue.java
new file mode 100644
index 00000000000..c49d9e41330
--- /dev/null
+++ b/examples/v2/security-monitoring/AttachJiraIssue.java
@@ -0,0 +1,66 @@
+// Attach security findings to a Jira issue 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.AttachJiraIssueRequest;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestData;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestDataAttributes;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestDataRelationships;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.FindingCaseResponse;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import com.datadog.api.client.v2.model.JiraIssuesDataType;
+import java.util.Arrays;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ AttachJiraIssueRequest body =
+ new AttachJiraIssueRequest()
+ .data(
+ new AttachJiraIssueRequestData()
+ .attributes(
+ new AttachJiraIssueRequestDataAttributes()
+ .jiraIssueUrl(
+ "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"))
+ .relationships(
+ new AttachJiraIssueRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Arrays.asList(
+ new FindingData()
+ .id(
+ "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=")
+ .type(FindingDataType.FINDINGS),
+ new FindingData()
+ .id(
+ "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(JiraIssuesDataType.JIRA_ISSUES));
+
+ try {
+ FindingCaseResponse result = apiInstance.attachJiraIssue(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#attachJiraIssue");
+ 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/AttachJiraIssue_3042842144.java b/examples/v2/security-monitoring/AttachJiraIssue_3042842144.java
new file mode 100644
index 00000000000..318ec992ad4
--- /dev/null
+++ b/examples/v2/security-monitoring/AttachJiraIssue_3042842144.java
@@ -0,0 +1,62 @@
+// Attach security finding to a Jira issue 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.AttachJiraIssueRequest;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestData;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestDataAttributes;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequestDataRelationships;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.FindingCaseResponse;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import com.datadog.api.client.v2.model.JiraIssuesDataType;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ AttachJiraIssueRequest body =
+ new AttachJiraIssueRequest()
+ .data(
+ new AttachJiraIssueRequestData()
+ .attributes(
+ new AttachJiraIssueRequestDataAttributes()
+ .jiraIssueUrl(
+ "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"))
+ .relationships(
+ new AttachJiraIssueRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(JiraIssuesDataType.JIRA_ISSUES));
+
+ try {
+ FindingCaseResponse result = apiInstance.attachJiraIssue(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#attachJiraIssue");
+ 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/CreateCases.java b/examples/v2/security-monitoring/CreateCases.java
new file mode 100644
index 00000000000..1d85e2724d9
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateCases.java
@@ -0,0 +1,86 @@
+// Create cases for security findings returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestArray;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateCaseRequestArray body =
+ new CreateCaseRequestArray()
+ .data(
+ Arrays.asList(
+ new CreateCaseRequestData()
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(CaseDataType.CASES),
+ new CreateCaseRequestData()
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(CaseDataType.CASES)));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createCases(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createCases");
+ 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/CreateCases_2385516013.java b/examples/v2/security-monitoring/CreateCases_2385516013.java
new file mode 100644
index 00000000000..bbca5c082f6
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateCases_2385516013.java
@@ -0,0 +1,63 @@
+// Create case for security finding returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestArray;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateCaseRequestArray body =
+ new CreateCaseRequestArray()
+ .data(
+ Collections.singletonList(
+ new CreateCaseRequestData()
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(CaseDataType.CASES)));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createCases(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createCases");
+ 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/CreateCases_2798851680.java b/examples/v2/security-monitoring/CreateCases_2798851680.java
new file mode 100644
index 00000000000..3c06a697e59
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateCases_2798851680.java
@@ -0,0 +1,68 @@
+// Create case for security findings returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestArray;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateCaseRequestArray body =
+ new CreateCaseRequestArray()
+ .data(
+ Collections.singletonList(
+ new CreateCaseRequestData()
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Arrays.asList(
+ new FindingData()
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")
+ .type(FindingDataType.FINDINGS),
+ new FindingData()
+ .id(
+ "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=")
+ .type(FindingDataType.FINDINGS))))
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")
+ .type(CaseManagementProjectDataType.PROJECTS))))
+ .type(CaseDataType.CASES)));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createCases(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createCases");
+ 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/CreateJiraIssues.java b/examples/v2/security-monitoring/CreateJiraIssues.java
new file mode 100644
index 00000000000..53dbdd74cb2
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateJiraIssues.java
@@ -0,0 +1,135 @@
+// Create Jira issues for security findings returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArray;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArrayIncluded;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestData;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCase;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCaseData;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import com.datadog.api.client.v2.model.JiraIssuesDataType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateJiraIssueRequestArray body =
+ new CreateJiraIssueRequestArray()
+ .data(
+ Arrays.asList(
+ new CreateJiraIssueRequestData()
+ .type(JiraIssuesDataType.JIRA_ISSUES)
+ .attributes(new CreateJiraIssueRequestDataAttributes())
+ .relationships(
+ new CreateJiraIssueRequestDataRelationships()
+ ._case(
+ new CreateJiraIssueRequestDataRelationshipsCase()
+ .data(
+ new CreateJiraIssueRequestDataRelationshipsCaseData()
+ .type(CaseDataType.CASES)
+ .id("53e242c6-a7d6-46ad-9680-b8d14753f716")))),
+ new CreateJiraIssueRequestData()
+ .type(JiraIssuesDataType.JIRA_ISSUES)
+ .attributes(new CreateJiraIssueRequestDataAttributes())
+ .relationships(
+ new CreateJiraIssueRequestDataRelationships()
+ ._case(
+ new CreateJiraIssueRequestDataRelationshipsCase()
+ .data(
+ new CreateJiraIssueRequestDataRelationshipsCaseData()
+ .type(CaseDataType.CASES)
+ .id("195772b2-1f53-41d2-b81e-48c8e6c21d33"))))))
+ .included(
+ Arrays.asList(
+ new CreateJiraIssueRequestArrayIncluded(
+ new CreateCaseRequestData()
+ .type(CaseDataType.CASES)
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")))
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=")))))
+ .id("53e242c6-a7d6-46ad-9680-b8d14753f716")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new CreateCaseRequestData()
+ .type(CaseDataType.CASES)
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")))
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=")))))
+ .id("195772b2-1f53-41d2-b81e-48c8e6c21d33")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM="))));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createJiraIssues(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createJiraIssues");
+ 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/CreateJiraIssues_379590688.java b/examples/v2/security-monitoring/CreateJiraIssues_379590688.java
new file mode 100644
index 00000000000..df6b9e51ef6
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateJiraIssues_379590688.java
@@ -0,0 +1,95 @@
+// Create Jira issue for security finding returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArray;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArrayIncluded;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestData;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCase;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCaseData;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import com.datadog.api.client.v2.model.JiraIssuesDataType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateJiraIssueRequestArray body =
+ new CreateJiraIssueRequestArray()
+ .data(
+ Collections.singletonList(
+ new CreateJiraIssueRequestData()
+ .type(JiraIssuesDataType.JIRA_ISSUES)
+ .attributes(new CreateJiraIssueRequestDataAttributes())
+ .relationships(
+ new CreateJiraIssueRequestDataRelationships()
+ ._case(
+ new CreateJiraIssueRequestDataRelationshipsCase()
+ .data(
+ new CreateJiraIssueRequestDataRelationshipsCaseData()
+ .type(CaseDataType.CASES)
+ .id("6a773295-8729-4034-aada-53b64cbe02e7"))))))
+ .included(
+ Arrays.asList(
+ new CreateJiraIssueRequestArrayIncluded(
+ new CreateCaseRequestData()
+ .type(CaseDataType.CASES)
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")))
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=")))))
+ .id("6a773295-8729-4034-aada-53b64cbe02e7")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="))));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createJiraIssues(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createJiraIssues");
+ 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/CreateJiraIssues_829823123.java b/examples/v2/security-monitoring/CreateJiraIssues_829823123.java
new file mode 100644
index 00000000000..ffa4b5f52cc
--- /dev/null
+++ b/examples/v2/security-monitoring/CreateJiraIssues_829823123.java
@@ -0,0 +1,104 @@
+// Create Jira issue for security findings returns "Created" 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.CaseDataType;
+import com.datadog.api.client.v2.model.CaseManagementProject;
+import com.datadog.api.client.v2.model.CaseManagementProjectData;
+import com.datadog.api.client.v2.model.CaseManagementProjectDataType;
+import com.datadog.api.client.v2.model.CreateCaseRequestData;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArray;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArrayIncluded;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestData;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationships;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCase;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestDataRelationshipsCaseData;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import com.datadog.api.client.v2.model.JiraIssuesDataType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ CreateJiraIssueRequestArray body =
+ new CreateJiraIssueRequestArray()
+ .data(
+ Collections.singletonList(
+ new CreateJiraIssueRequestData()
+ .type(JiraIssuesDataType.JIRA_ISSUES)
+ .attributes(new CreateJiraIssueRequestDataAttributes())
+ .relationships(
+ new CreateJiraIssueRequestDataRelationships()
+ ._case(
+ new CreateJiraIssueRequestDataRelationshipsCase()
+ .data(
+ new CreateJiraIssueRequestDataRelationshipsCaseData()
+ .type(CaseDataType.CASES)
+ .id("e469ceda-957a-4557-a607-9ff25032e9ca"))))))
+ .included(
+ Arrays.asList(
+ new CreateJiraIssueRequestArrayIncluded(
+ new CreateCaseRequestData()
+ .type(CaseDataType.CASES)
+ .attributes(
+ new CreateCaseRequestDataAttributes()
+ .title("A title")
+ .description("A description"))
+ .relationships(
+ new CreateCaseRequestDataRelationships()
+ .project(
+ new CaseManagementProject()
+ .data(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")))
+ .findings(
+ new Findings()
+ .data(
+ Arrays.asList(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="),
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=")))))
+ .id("e469ceda-957a-4557-a607-9ff25032e9ca")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new CaseManagementProjectData()
+ .type(CaseManagementProjectDataType.PROJECTS)
+ .id("959a6f71-bac8-4027-b1d3-2264f569296f")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=")),
+ new CreateJiraIssueRequestArrayIncluded(
+ new FindingData()
+ .type(FindingDataType.FINDINGS)
+ .id(
+ "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="))));
+
+ try {
+ FindingCaseResponseArray result = apiInstance.createJiraIssues(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#createJiraIssues");
+ 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/DetachCase.java b/examples/v2/security-monitoring/DetachCase.java
new file mode 100644
index 00000000000..a1ea2afa5c8
--- /dev/null
+++ b/examples/v2/security-monitoring/DetachCase.java
@@ -0,0 +1,46 @@
+// Detach security findings from their case returns "No Content" 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.CaseDataType;
+import com.datadog.api.client.v2.model.DetachCaseRequest;
+import com.datadog.api.client.v2.model.DetachCaseRequestData;
+import com.datadog.api.client.v2.model.DetachCaseRequestDataRelationships;
+import com.datadog.api.client.v2.model.FindingData;
+import com.datadog.api.client.v2.model.FindingDataType;
+import com.datadog.api.client.v2.model.Findings;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ DetachCaseRequest body =
+ new DetachCaseRequest()
+ .data(
+ new DetachCaseRequestData()
+ .relationships(
+ new DetachCaseRequestDataRelationships()
+ .findings(
+ new Findings()
+ .data(
+ Collections.singletonList(
+ new FindingData()
+ .id(
+ "YzM2MTFjYzcyNmY0Zjg4MTAxZmRlNjQ1MWU1ZGQwYzR-YzI5NzE5Y2Y4MzU4ZjliNzhkNjYxNTY0ODIzZDQ2YTM=")
+ .type(FindingDataType.FINDINGS)))))
+ .type(CaseDataType.CASES));
+
+ try {
+ apiInstance.detachCase(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#detachCase");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java
index a6b569264c1..50115900a58 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
@@ -6,15 +6,22 @@
import com.datadog.api.client.PaginationIterable;
import com.datadog.api.client.Pair;
import com.datadog.api.client.v2.model.AssetType;
+import com.datadog.api.client.v2.model.AttachCaseRequest;
+import com.datadog.api.client.v2.model.AttachJiraIssueRequest;
import com.datadog.api.client.v2.model.BulkMuteFindingsRequest;
import com.datadog.api.client.v2.model.BulkMuteFindingsResponse;
import com.datadog.api.client.v2.model.CloudAssetType;
import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest;
+import com.datadog.api.client.v2.model.CreateCaseRequestArray;
import com.datadog.api.client.v2.model.CreateCustomFrameworkRequest;
import com.datadog.api.client.v2.model.CreateCustomFrameworkResponse;
+import com.datadog.api.client.v2.model.CreateJiraIssueRequestArray;
import com.datadog.api.client.v2.model.CreateNotificationRuleParameters;
import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse;
+import com.datadog.api.client.v2.model.DetachCaseRequest;
import com.datadog.api.client.v2.model.Finding;
+import com.datadog.api.client.v2.model.FindingCaseResponse;
+import com.datadog.api.client.v2.model.FindingCaseResponseArray;
import com.datadog.api.client.v2.model.FindingEvaluation;
import com.datadog.api.client.v2.model.FindingStatus;
import com.datadog.api.client.v2.model.FindingVulnerabilityType;
@@ -116,6 +123,295 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Attach security findings to a case.
+ *
+ *
See {@link #attachCaseWithHttpInfo}.
+ *
+ * @param caseId The unique identifier of the case to attach security findings to (required)
+ * @param body (required)
+ * @return FindingCaseResponse
+ * @throws ApiException if fails to make API call
+ */
+ public FindingCaseResponse attachCase(String caseId, AttachCaseRequest body) throws ApiException {
+ return attachCaseWithHttpInfo(caseId, body).getData();
+ }
+
+ /**
+ * Attach security findings to a case.
+ *
+ *
See {@link #attachCaseWithHttpInfoAsync}.
+ *
+ * @param caseId The unique identifier of the case to attach security findings to (required)
+ * @param body (required)
+ * @return CompletableFuture<FindingCaseResponse>
+ */
+ public CompletableFuture attachCaseAsync(
+ String caseId, AttachCaseRequest body) {
+ return attachCaseWithHttpInfoAsync(caseId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Attach security findings to a case. You can attach up to 50 security findings per case.
+ * Security findings that are already attached to another case will be detached from their
+ * previous case and attached to the specified case.
+ *
+ * @param caseId The unique identifier of the case to attach security findings to (required)
+ * @param body (required)
+ * @return ApiResponse<FindingCaseResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse attachCaseWithHttpInfo(
+ String caseId, AttachCaseRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'caseId' is set
+ if (caseId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'caseId' when calling attachCase");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling attachCase");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/security/findings/cases/{case_id}"
+ .replaceAll("\\{" + "case_id" + "\\}", apiClient.escapeString(caseId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.attachCase",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Attach security findings to a case.
+ *
+ * See {@link #attachCaseWithHttpInfo}.
+ *
+ * @param caseId The unique identifier of the case to attach security findings to (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<FindingCaseResponse>>
+ */
+ public CompletableFuture> attachCaseWithHttpInfoAsync(
+ String caseId, AttachCaseRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'caseId' is set
+ if (caseId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'caseId' when calling attachCase"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'body' when calling attachCase"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/security/findings/cases/{case_id}"
+ .replaceAll("\\{" + "case_id" + "\\}", apiClient.escapeString(caseId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.attachCase",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Attach security findings to a Jira issue.
+ *
+ * See {@link #attachJiraIssueWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return FindingCaseResponse
+ * @throws ApiException if fails to make API call
+ */
+ public FindingCaseResponse attachJiraIssue(AttachJiraIssueRequest body) throws ApiException {
+ return attachJiraIssueWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Attach security findings to a Jira issue.
+ *
+ *
See {@link #attachJiraIssueWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<FindingCaseResponse>
+ */
+ public CompletableFuture attachJiraIssueAsync(AttachJiraIssueRequest body) {
+ return attachJiraIssueWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Attach security findings to a Jira issue by providing the Jira issue URL. You can attach up to
+ * 50 security findings per Jira issue. If the Jira issue is not linked to any case, this
+ * operation will create a case for the security findings and link the Jira issue to the newly
+ * created case. Security findings that are already attached to another Jira issue will be
+ * detached from their previous Jira issue and attached to the specified Jira issue.
+ *
+ * @param body (required)
+ * @return ApiResponse<FindingCaseResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse attachJiraIssueWithHttpInfo(AttachJiraIssueRequest 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 attachJiraIssue");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security/findings/jira_issues";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.attachJiraIssue",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Attach security findings to a Jira issue.
+ *
+ * See {@link #attachJiraIssueWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<FindingCaseResponse>>
+ */
+ public CompletableFuture> attachJiraIssueWithHttpInfoAsync(
+ AttachJiraIssueRequest 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 attachJiraIssue"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security/findings/jira_issues";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.attachJiraIssue",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
/**
* Cancel a threat hunting job.
*
@@ -504,41 +800,323 @@ public ApiResponse convertJobResultToSignalWithHttpInfo(
localVarPostBody,
new HashMap(),
false,
- null);
+ null);
+ }
+
+ /**
+ * Convert a job result to a signal.
+ *
+ * See {@link #convertJobResultToSignalWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> convertJobResultToSignalWithHttpInfoAsync(
+ ConvertJobResultsToSignalsRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "convertJobResultToSignal";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling convertJobResultToSignal"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.convertJobResultToSignal",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Convert a rule from JSON to Terraform.
+ *
+ * See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return SecurityMonitoringRuleConvertResponse
+ * @throws ApiException if fails to make API call
+ */
+ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJSONToTerraform(
+ SecurityMonitoringRuleConvertPayload body) throws ApiException {
+ return convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Convert a rule from JSON to Terraform.
+ *
+ *
See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<SecurityMonitoringRuleConvertResponse>
+ */
+ public CompletableFuture
+ convertSecurityMonitoringRuleFromJSONToTerraformAsync(
+ SecurityMonitoringRuleConvertPayload body) {
+ return convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Convert a rule that doesn't (yet) exist from JSON to Terraform for Datadog provider resource
+ * datadog_security_monitoring_rule. You can do so for the following rule types: -
+ * App and API Protection - Cloud SIEM (log detection and signal correlation) - Workload
+ * Protection
+ *
+ * You can convert Cloud Security configuration rules using Terraform's Datadog
+ * Cloud Configuration Rule resource.
+ *
+ * @param body (required)
+ * @return ApiResponse<SecurityMonitoringRuleConvertResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Concurrent Modification | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo(
+ SecurityMonitoringRuleConvertPayload 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"
+ + " convertSecurityMonitoringRuleFromJSONToTerraform");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security_monitoring/rules/convert";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.convertSecurityMonitoringRuleFromJSONToTerraform",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Convert a rule from JSON to Terraform.
+ *
+ * See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleConvertResponse>>
+ */
+ public CompletableFuture>
+ convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync(
+ SecurityMonitoringRuleConvertPayload 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"
+ + " convertSecurityMonitoringRuleFromJSONToTerraform"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security_monitoring/rules/convert";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.convertSecurityMonitoringRuleFromJSONToTerraform",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create cases for security findings.
+ *
+ * See {@link #createCasesWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return FindingCaseResponseArray
+ * @throws ApiException if fails to make API call
+ */
+ public FindingCaseResponseArray createCases(CreateCaseRequestArray body) throws ApiException {
+ return createCasesWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create cases for security findings.
+ *
+ *
See {@link #createCasesWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<FindingCaseResponseArray>
+ */
+ public CompletableFuture createCasesAsync(CreateCaseRequestArray body) {
+ return createCasesWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create cases for security findings. You can create up to 50 cases per request and associate up
+ * to 50 security findings per case. Security findings that are already attached to another case
+ * will be detached from their previous case and attached to the newly created case.
+ *
+ * @param body (required)
+ * @return ApiResponse<FindingCaseResponseArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createCasesWithHttpInfo(CreateCaseRequestArray 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 createCases");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security/findings/cases";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.createCases",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
}
/**
- * Convert a job result to a signal.
+ * Create cases for security findings.
*
- * See {@link #convertJobResultToSignalWithHttpInfo}.
+ *
See {@link #createCasesWithHttpInfo}.
*
* @param body (required)
- * @return CompletableFuture<ApiResponse<Void>>
+ * @return CompletableFuture<ApiResponse<FindingCaseResponseArray>>
*/
- public CompletableFuture> convertJobResultToSignalWithHttpInfoAsync(
- ConvertJobResultsToSignalsRequest body) {
- // Check if unstable operation is enabled
- String operationId = "convertJobResultToSignal";
- if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
- apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
- } else {
- CompletableFuture> result = new CompletableFuture<>();
- result.completeExceptionally(
- new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
- return result;
- }
+ public CompletableFuture> createCasesWithHttpInfoAsync(
+ CreateCaseRequestArray body) {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
- new ApiException(
- 400, "Missing the required parameter 'body' when calling convertJobResultToSignal"));
+ new ApiException(400, "Missing the required parameter 'body' when calling createCases"));
return result;
}
// create path and map variables
- String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert";
+ String localVarPath = "/api/v2/security/findings/cases";
Map localVarHeaderParams = new HashMap();
@@ -546,15 +1124,15 @@ public CompletableFuture> convertJobResultToSignalWithHttpInfo
try {
builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.convertJobResultToSignal",
+ "v2.SecurityMonitoringApi.createCases",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
- new String[] {"*/*"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -566,35 +1144,34 @@ public CompletableFuture> convertJobResultToSignalWithHttpInfo
localVarPostBody,
new HashMap(),
false,
- null);
+ new GenericType() {});
}
/**
- * Convert a rule from JSON to Terraform.
+ * Create a custom framework.
*
- * See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo}.
+ *
See {@link #createCustomFrameworkWithHttpInfo}.
*
* @param body (required)
- * @return SecurityMonitoringRuleConvertResponse
+ * @return CreateCustomFrameworkResponse
* @throws ApiException if fails to make API call
*/
- public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJSONToTerraform(
- SecurityMonitoringRuleConvertPayload body) throws ApiException {
- return convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo(body).getData();
+ public CreateCustomFrameworkResponse createCustomFramework(CreateCustomFrameworkRequest body)
+ throws ApiException {
+ return createCustomFrameworkWithHttpInfo(body).getData();
}
/**
- * Convert a rule from JSON to Terraform.
+ * Create a custom framework.
*
- *
See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync}.
+ *
See {@link #createCustomFrameworkWithHttpInfoAsync}.
*
* @param body (required)
- * @return CompletableFuture<SecurityMonitoringRuleConvertResponse>
+ * @return CompletableFuture<CreateCustomFrameworkResponse>
*/
- public CompletableFuture
- convertSecurityMonitoringRuleFromJSONToTerraformAsync(
- SecurityMonitoringRuleConvertPayload body) {
- return convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync(body)
+ public CompletableFuture createCustomFrameworkAsync(
+ CreateCustomFrameworkRequest body) {
+ return createCustomFrameworkWithHttpInfoAsync(body)
.thenApply(
response -> {
return response.getData();
@@ -602,17 +1179,10 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
}
/**
- * Convert a rule that doesn't (yet) exist from JSON to Terraform for Datadog provider resource
- * datadog_security_monitoring_rule. You can do so for the following rule types: -
- * App and API Protection - Cloud SIEM (log detection and signal correlation) - Workload
- * Protection
- *
- * You can convert Cloud Security configuration rules using Terraform's Datadog
- * Cloud Configuration Rule resource.
+ * Create a custom framework.
*
* @param body (required)
- * @return ApiResponse<SecurityMonitoringRuleConvertResponse>
+ * @return ApiResponse<CreateCustomFrameworkResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -620,32 +1190,28 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
* | Status Code | Description | Response Headers |
* | 200 | OK | - |
* | 400 | Bad Request | - |
- * | 401 | Concurrent Modification | - |
- * | 403 | Not Authorized | - |
- * | 404 | Not Found | - |
+ * | 409 | Conflict | - |
* | 429 | Too many requests | - |
+ * | 500 | Bad Request | - |
*
*/
- public ApiResponse
- convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo(
- SecurityMonitoringRuleConvertPayload body) throws ApiException {
+ public ApiResponse createCustomFrameworkWithHttpInfo(
+ CreateCustomFrameworkRequest 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"
- + " convertSecurityMonitoringRuleFromJSONToTerraform");
+ 400, "Missing the required parameter 'body' when calling createCustomFramework");
}
// create path and map variables
- String localVarPath = "/api/v2/security_monitoring/rules/convert";
+ String localVarPath = "/api/v2/cloud_security_management/custom_frameworks";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.convertSecurityMonitoringRuleFromJSONToTerraform",
+ "v2.SecurityMonitoringApi.createCustomFramework",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -660,35 +1226,32 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Convert a rule from JSON to Terraform.
+ * Create a custom framework.
*
- * See {@link #convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfo}.
+ *
See {@link #createCustomFrameworkWithHttpInfo}.
*
* @param body (required)
- * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleConvertResponse>>
+ * @return CompletableFuture<ApiResponse<CreateCustomFrameworkResponse>>
*/
- public CompletableFuture>
- convertSecurityMonitoringRuleFromJSONToTerraformWithHttpInfoAsync(
- SecurityMonitoringRuleConvertPayload body) {
+ public CompletableFuture>
+ createCustomFrameworkWithHttpInfoAsync(CreateCustomFrameworkRequest body) {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
- CompletableFuture> result =
+ CompletableFuture> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400,
- "Missing the required parameter 'body' when calling"
- + " convertSecurityMonitoringRuleFromJSONToTerraform"));
+ 400, "Missing the required parameter 'body' when calling createCustomFramework"));
return result;
}
// create path and map variables
- String localVarPath = "/api/v2/security_monitoring/rules/convert";
+ String localVarPath = "/api/v2/cloud_security_management/custom_frameworks";
Map localVarHeaderParams = new HashMap();
@@ -696,7 +1259,7 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
try {
builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.convertSecurityMonitoringRuleFromJSONToTerraform",
+ "v2.SecurityMonitoringApi.createCustomFramework",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -704,7 +1267,7 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
- CompletableFuture> result =
+ CompletableFuture> result =
new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
@@ -717,34 +1280,34 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Create a custom framework.
+ * Create Jira issues for security findings.
*
- * See {@link #createCustomFrameworkWithHttpInfo}.
+ *
See {@link #createJiraIssuesWithHttpInfo}.
*
* @param body (required)
- * @return CreateCustomFrameworkResponse
+ * @return FindingCaseResponseArray
* @throws ApiException if fails to make API call
*/
- public CreateCustomFrameworkResponse createCustomFramework(CreateCustomFrameworkRequest body)
+ public FindingCaseResponseArray createJiraIssues(CreateJiraIssueRequestArray body)
throws ApiException {
- return createCustomFrameworkWithHttpInfo(body).getData();
+ return createJiraIssuesWithHttpInfo(body).getData();
}
/**
- * Create a custom framework.
+ * Create Jira issues for security findings.
*
- *
See {@link #createCustomFrameworkWithHttpInfoAsync}.
+ *
See {@link #createJiraIssuesWithHttpInfoAsync}.
*
* @param body (required)
- * @return CompletableFuture<CreateCustomFrameworkResponse>
+ * @return CompletableFuture<FindingCaseResponseArray>
*/
- public CompletableFuture createCustomFrameworkAsync(
- CreateCustomFrameworkRequest body) {
- return createCustomFrameworkWithHttpInfoAsync(body)
+ public CompletableFuture createJiraIssuesAsync(
+ CreateJiraIssueRequestArray body) {
+ return createJiraIssuesWithHttpInfoAsync(body)
.thenApply(
response -> {
return response.getData();
@@ -752,39 +1315,42 @@ public CompletableFuture createCustomFrameworkAsy
}
/**
- * Create a custom framework.
+ * Create Jira issues for security findings. This operation creates a case in Datadog and a Jira
+ * issue linked to that case for bidirectional sync between Datadog and Jira. You can create up to
+ * 50 Jira issues per request and associate up to 50 security findings per Jira issue. Security
+ * findings that are already attached to another Jira issue will be detached from their previous
+ * Jira issue and attached to the newly created Jira issue.
*
* @param body (required)
- * @return ApiResponse<CreateCustomFrameworkResponse>
+ * @return ApiResponse<FindingCaseResponseArray>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* | Status Code | Description | Response Headers |
- * | 200 | OK | - |
+ * | 201 | Created | - |
* | 400 | Bad Request | - |
- * | 409 | Conflict | - |
+ * | 404 | Not Found | - |
* | 429 | Too many requests | - |
- * | 500 | Bad Request | - |
*
*/
- public ApiResponse createCustomFrameworkWithHttpInfo(
- CreateCustomFrameworkRequest body) throws ApiException {
+ public ApiResponse createJiraIssuesWithHttpInfo(
+ CreateJiraIssueRequestArray 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 createCustomFramework");
+ 400, "Missing the required parameter 'body' when calling createJiraIssues");
}
// create path and map variables
- String localVarPath = "/api/v2/cloud_security_management/custom_frameworks";
+ String localVarPath = "/api/v2/security/findings/jira_issues";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.createCustomFramework",
+ "v2.SecurityMonitoringApi.createJiraIssues",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -799,32 +1365,31 @@ public ApiResponse createCustomFrameworkWithHttpI
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Create a custom framework.
+ * Create Jira issues for security findings.
*
- * See {@link #createCustomFrameworkWithHttpInfo}.
+ *
See {@link #createJiraIssuesWithHttpInfo}.
*
* @param body (required)
- * @return CompletableFuture<ApiResponse<CreateCustomFrameworkResponse>>
+ * @return CompletableFuture<ApiResponse<FindingCaseResponseArray>>
*/
- public CompletableFuture>
- createCustomFrameworkWithHttpInfoAsync(CreateCustomFrameworkRequest body) {
+ public CompletableFuture> createJiraIssuesWithHttpInfoAsync(
+ CreateJiraIssueRequestArray body) {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
- CompletableFuture> result =
- new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400, "Missing the required parameter 'body' when calling createCustomFramework"));
+ 400, "Missing the required parameter 'body' when calling createJiraIssues"));
return result;
}
// create path and map variables
- String localVarPath = "/api/v2/cloud_security_management/custom_frameworks";
+ String localVarPath = "/api/v2/security/findings/jira_issues";
Map localVarHeaderParams = new HashMap();
@@ -832,7 +1397,7 @@ public ApiResponse createCustomFrameworkWithHttpI
try {
builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.createCustomFramework",
+ "v2.SecurityMonitoringApi.createJiraIssues",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -840,8 +1405,7 @@ public ApiResponse createCustomFrameworkWithHttpI
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
- CompletableFuture> result =
- new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -853,7 +1417,7 @@ public ApiResponse createCustomFrameworkWithHttpI
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
@@ -2558,6 +3122,135 @@ public CompletableFuture> deleteVulnerabilityNotificationRuleW
null);
}
+ /**
+ * Detach security findings from their case.
+ *
+ * See {@link #detachCaseWithHttpInfo}.
+ *
+ * @param body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void detachCase(DetachCaseRequest body) throws ApiException {
+ detachCaseWithHttpInfo(body);
+ }
+
+ /**
+ * Detach security findings from their case.
+ *
+ *
See {@link #detachCaseWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture detachCaseAsync(DetachCaseRequest body) {
+ return detachCaseWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Detach security findings from their case. This operation dissociates security findings from
+ * their associated cases without deleting the cases themselves. You can detach security findings
+ * from multiple different cases in a single request, with a limit of 50 security findings per
+ * request. Security findings that are not currently attached to any case will be ignored.
+ *
+ * @param body (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest 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 detachCase");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security/findings/cases";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.detachCase",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Detach security findings from their case.
+ *
+ * See {@link #detachCaseWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCaseRequest 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 detachCase"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/security/findings/cases";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.detachCase",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
/**
* Modify the triage assignee of a security signal.
*
@@ -10643,7 +11336,7 @@ public ApiResponse muteFindingsWithHttpInfo(
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
return apiClient.invokeAPI(
"PATCH",
builder,
@@ -10708,7 +11401,7 @@ public CompletableFuture> muteFindingsWith
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequest.java b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequest.java
new file mode 100644
index 00000000000..d168a9106c5
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequest.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request for attaching security findings to a case. */
+@JsonPropertyOrder({AttachCaseRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachCaseRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AttachCaseRequestData data;
+
+ public AttachCaseRequest data(AttachCaseRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data of the case to attach security findings to.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AttachCaseRequestData getData() {
+ return data;
+ }
+
+ public void setData(AttachCaseRequestData 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 AttachCaseRequest
+ */
+ @JsonAnySetter
+ public AttachCaseRequest 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 AttachCaseRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachCaseRequest attachCaseRequest = (AttachCaseRequest) o;
+ return Objects.equals(this.data, attachCaseRequest.data)
+ && Objects.equals(this.additionalProperties, attachCaseRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachCaseRequest {\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/AttachCaseRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequestData.java
new file mode 100644
index 00000000000..a1ef2258de0
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequestData.java
@@ -0,0 +1,206 @@
+/*
+ * 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 of the case to attach security findings to. */
+@JsonPropertyOrder({
+ AttachCaseRequestData.JSON_PROPERTY_ID,
+ AttachCaseRequestData.JSON_PROPERTY_RELATIONSHIPS,
+ AttachCaseRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachCaseRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private AttachCaseRequestDataRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CaseDataType type = CaseDataType.CASES;
+
+ public AttachCaseRequestData() {}
+
+ @JsonCreator
+ public AttachCaseRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CaseDataType type) {
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AttachCaseRequestData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the case.
+ *
+ * @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 AttachCaseRequestData relationships(AttachCaseRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships of the case to attach security findings to.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AttachCaseRequestDataRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(AttachCaseRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public AttachCaseRequestData type(CaseDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Cases resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseDataType getType() {
+ return type;
+ }
+
+ public void setType(CaseDataType 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 AttachCaseRequestData
+ */
+ @JsonAnySetter
+ public AttachCaseRequestData 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 AttachCaseRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachCaseRequestData attachCaseRequestData = (AttachCaseRequestData) o;
+ return Objects.equals(this.id, attachCaseRequestData.id)
+ && Objects.equals(this.relationships, attachCaseRequestData.relationships)
+ && Objects.equals(this.type, attachCaseRequestData.type)
+ && Objects.equals(this.additionalProperties, attachCaseRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachCaseRequestData {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).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/AttachCaseRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequestDataRelationships.java
new file mode 100644
index 00000000000..ec56b9751c1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachCaseRequestDataRelationships.java
@@ -0,0 +1,147 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Relationships of the case to attach security findings to. */
+@JsonPropertyOrder({AttachCaseRequestDataRelationships.JSON_PROPERTY_FINDINGS})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachCaseRequestDataRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_FINDINGS = "findings";
+ private Findings findings;
+
+ public AttachCaseRequestDataRelationships() {}
+
+ @JsonCreator
+ public AttachCaseRequestDataRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ }
+
+ public AttachCaseRequestDataRelationships findings(Findings findings) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ return this;
+ }
+
+ /**
+ * A list of security findings.
+ *
+ * @return findings
+ */
+ @JsonProperty(JSON_PROPERTY_FINDINGS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Findings getFindings() {
+ return findings;
+ }
+
+ public void setFindings(Findings findings) {
+ this.findings = findings;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AttachCaseRequestDataRelationships
+ */
+ @JsonAnySetter
+ public AttachCaseRequestDataRelationships 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 AttachCaseRequestDataRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachCaseRequestDataRelationships attachCaseRequestDataRelationships =
+ (AttachCaseRequestDataRelationships) o;
+ return Objects.equals(this.findings, attachCaseRequestDataRelationships.findings)
+ && Objects.equals(
+ this.additionalProperties, attachCaseRequestDataRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(findings, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachCaseRequestDataRelationships {\n");
+ sb.append(" findings: ").append(toIndentedString(findings)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequest.java b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequest.java
new file mode 100644
index 00000000000..cc64dfb9888
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequest.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request for attaching security findings to a Jira issue. */
+@JsonPropertyOrder({AttachJiraIssueRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachJiraIssueRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AttachJiraIssueRequestData data;
+
+ public AttachJiraIssueRequest data(AttachJiraIssueRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data of the Jira issue to attach security findings to.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AttachJiraIssueRequestData getData() {
+ return data;
+ }
+
+ public void setData(AttachJiraIssueRequestData 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 AttachJiraIssueRequest
+ */
+ @JsonAnySetter
+ public AttachJiraIssueRequest 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 AttachJiraIssueRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachJiraIssueRequest attachJiraIssueRequest = (AttachJiraIssueRequest) o;
+ return Objects.equals(this.data, attachJiraIssueRequest.data)
+ && Objects.equals(this.additionalProperties, attachJiraIssueRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachJiraIssueRequest {\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/AttachJiraIssueRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestData.java
new file mode 100644
index 00000000000..3656fafca81
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestData.java
@@ -0,0 +1,235 @@
+/*
+ * 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 of the Jira issue to attach security findings to. */
+@JsonPropertyOrder({
+ AttachJiraIssueRequestData.JSON_PROPERTY_ATTRIBUTES,
+ AttachJiraIssueRequestData.JSON_PROPERTY_ID,
+ AttachJiraIssueRequestData.JSON_PROPERTY_RELATIONSHIPS,
+ AttachJiraIssueRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachJiraIssueRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private AttachJiraIssueRequestDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private AttachJiraIssueRequestDataRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private JiraIssuesDataType type = JiraIssuesDataType.JIRA_ISSUES;
+
+ public AttachJiraIssueRequestData() {}
+
+ @JsonCreator
+ public AttachJiraIssueRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) JiraIssuesDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AttachJiraIssueRequestData attributes(AttachJiraIssueRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes of the Jira issue to attach security findings to.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AttachJiraIssueRequestDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(AttachJiraIssueRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public AttachJiraIssueRequestData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the Jira issue attachment request.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public AttachJiraIssueRequestData relationships(
+ AttachJiraIssueRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships of the Jira issue to attach security findings to.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AttachJiraIssueRequestDataRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(AttachJiraIssueRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public AttachJiraIssueRequestData type(JiraIssuesDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Jira issues resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public JiraIssuesDataType getType() {
+ return type;
+ }
+
+ public void setType(JiraIssuesDataType 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 AttachJiraIssueRequestData
+ */
+ @JsonAnySetter
+ public AttachJiraIssueRequestData 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 AttachJiraIssueRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachJiraIssueRequestData attachJiraIssueRequestData = (AttachJiraIssueRequestData) o;
+ return Objects.equals(this.attributes, attachJiraIssueRequestData.attributes)
+ && Objects.equals(this.id, attachJiraIssueRequestData.id)
+ && Objects.equals(this.relationships, attachJiraIssueRequestData.relationships)
+ && Objects.equals(this.type, attachJiraIssueRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, attachJiraIssueRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachJiraIssueRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).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/AttachJiraIssueRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestDataAttributes.java
new file mode 100644
index 00000000000..eb1b027c265
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestDataAttributes.java
@@ -0,0 +1,145 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes of the Jira issue to attach security findings to. */
+@JsonPropertyOrder({AttachJiraIssueRequestDataAttributes.JSON_PROPERTY_JIRA_ISSUE_URL})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachJiraIssueRequestDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_JIRA_ISSUE_URL = "jira_issue_url";
+ private String jiraIssueUrl;
+
+ public AttachJiraIssueRequestDataAttributes() {}
+
+ @JsonCreator
+ public AttachJiraIssueRequestDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_JIRA_ISSUE_URL) String jiraIssueUrl) {
+ this.jiraIssueUrl = jiraIssueUrl;
+ }
+
+ public AttachJiraIssueRequestDataAttributes jiraIssueUrl(String jiraIssueUrl) {
+ this.jiraIssueUrl = jiraIssueUrl;
+ return this;
+ }
+
+ /**
+ * The URL of the Jira issue to attach security findings to.
+ *
+ * @return jiraIssueUrl
+ */
+ @JsonProperty(JSON_PROPERTY_JIRA_ISSUE_URL)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getJiraIssueUrl() {
+ return jiraIssueUrl;
+ }
+
+ public void setJiraIssueUrl(String jiraIssueUrl) {
+ this.jiraIssueUrl = jiraIssueUrl;
+ }
+
+ /**
+ * 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 AttachJiraIssueRequestDataAttributes
+ */
+ @JsonAnySetter
+ public AttachJiraIssueRequestDataAttributes 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 AttachJiraIssueRequestDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachJiraIssueRequestDataAttributes attachJiraIssueRequestDataAttributes =
+ (AttachJiraIssueRequestDataAttributes) o;
+ return Objects.equals(this.jiraIssueUrl, attachJiraIssueRequestDataAttributes.jiraIssueUrl)
+ && Objects.equals(
+ this.additionalProperties, attachJiraIssueRequestDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(jiraIssueUrl, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachJiraIssueRequestDataAttributes {\n");
+ sb.append(" jiraIssueUrl: ").append(toIndentedString(jiraIssueUrl)).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/AttachJiraIssueRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestDataRelationships.java
new file mode 100644
index 00000000000..03f92afc03a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AttachJiraIssueRequestDataRelationships.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;
+
+/** Relationships of the Jira issue to attach security findings to. */
+@JsonPropertyOrder({
+ AttachJiraIssueRequestDataRelationships.JSON_PROPERTY_FINDINGS,
+ AttachJiraIssueRequestDataRelationships.JSON_PROPERTY_PROJECT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AttachJiraIssueRequestDataRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_FINDINGS = "findings";
+ private Findings findings;
+
+ public static final String JSON_PROPERTY_PROJECT = "project";
+ private CaseManagementProject project;
+
+ public AttachJiraIssueRequestDataRelationships() {}
+
+ @JsonCreator
+ public AttachJiraIssueRequestDataRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings,
+ @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT) CaseManagementProject project) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ this.project = project;
+ this.unparsed |= project.unparsed;
+ }
+
+ public AttachJiraIssueRequestDataRelationships findings(Findings findings) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ return this;
+ }
+
+ /**
+ * A list of security findings.
+ *
+ * @return findings
+ */
+ @JsonProperty(JSON_PROPERTY_FINDINGS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Findings getFindings() {
+ return findings;
+ }
+
+ public void setFindings(Findings findings) {
+ this.findings = findings;
+ }
+
+ public AttachJiraIssueRequestDataRelationships project(CaseManagementProject project) {
+ this.project = project;
+ this.unparsed |= project.unparsed;
+ return this;
+ }
+
+ /**
+ * Case management project.
+ *
+ * @return project
+ */
+ @JsonProperty(JSON_PROPERTY_PROJECT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseManagementProject getProject() {
+ return project;
+ }
+
+ public void setProject(CaseManagementProject project) {
+ this.project = project;
+ }
+
+ /**
+ * 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 AttachJiraIssueRequestDataRelationships
+ */
+ @JsonAnySetter
+ public AttachJiraIssueRequestDataRelationships 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 AttachJiraIssueRequestDataRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AttachJiraIssueRequestDataRelationships attachJiraIssueRequestDataRelationships =
+ (AttachJiraIssueRequestDataRelationships) o;
+ return Objects.equals(this.findings, attachJiraIssueRequestDataRelationships.findings)
+ && Objects.equals(this.project, attachJiraIssueRequestDataRelationships.project)
+ && Objects.equals(
+ this.additionalProperties,
+ attachJiraIssueRequestDataRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(findings, project, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttachJiraIssueRequestDataRelationships {\n");
+ sb.append(" findings: ").append(toIndentedString(findings)).append("\n");
+ sb.append(" project: ").append(toIndentedString(project)).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/CaseDataType.java b/src/main/java/com/datadog/api/client/v2/model/CaseDataType.java
new file mode 100644
index 00000000000..c594fe30f49
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CaseDataType.java
@@ -0,0 +1,53 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Cases resource type. */
+@JsonSerialize(using = CaseDataType.CaseDataTypeSerializer.class)
+public class CaseDataType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("cases"));
+
+ public static final CaseDataType CASES = new CaseDataType("cases");
+
+ CaseDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class CaseDataTypeSerializer extends StdSerializer {
+ public CaseDataTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public CaseDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(CaseDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static CaseDataType fromValue(String value) {
+ return new CaseDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CaseInsightsItems.java b/src/main/java/com/datadog/api/client/v2/model/CaseInsightsItems.java
new file mode 100644
index 00000000000..5862079f5d7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CaseInsightsItems.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.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;
+
+/** An insight of the case. */
+@JsonPropertyOrder({
+ CaseInsightsItems.JSON_PROPERTY_REF,
+ CaseInsightsItems.JSON_PROPERTY_RESOURCE_ID,
+ CaseInsightsItems.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CaseInsightsItems {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_REF = "ref";
+ private String ref;
+
+ public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id";
+ private String resourceId;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private String type;
+
+ public CaseInsightsItems ref(String ref) {
+ this.ref = ref;
+ return this;
+ }
+
+ /**
+ * The reference of the insight.
+ *
+ * @return ref
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REF)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getRef() {
+ return ref;
+ }
+
+ public void setRef(String ref) {
+ this.ref = ref;
+ }
+
+ public CaseInsightsItems resourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the resource. For example, the unique identifier of a security
+ * finding.
+ *
+ * @return resourceId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RESOURCE_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public CaseInsightsItems type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of the resource. For example, the type of a security finding is "SECURITY_FINDING".
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ 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 CaseInsightsItems
+ */
+ @JsonAnySetter
+ public CaseInsightsItems 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 CaseInsightsItems object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CaseInsightsItems caseInsightsItems = (CaseInsightsItems) o;
+ return Objects.equals(this.ref, caseInsightsItems.ref)
+ && Objects.equals(this.resourceId, caseInsightsItems.resourceId)
+ && Objects.equals(this.type, caseInsightsItems.type)
+ && Objects.equals(this.additionalProperties, caseInsightsItems.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ref, resourceId, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CaseInsightsItems {\n");
+ sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
+ sb.append(" resourceId: ").append(toIndentedString(resourceId)).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/CaseManagementProject.java b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProject.java
new file mode 100644
index 00000000000..095923da858
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProject.java
@@ -0,0 +1,145 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Case management project. */
+@JsonPropertyOrder({CaseManagementProject.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CaseManagementProject {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CaseManagementProjectData data;
+
+ public CaseManagementProject() {}
+
+ @JsonCreator
+ public CaseManagementProject(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CaseManagementProjectData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public CaseManagementProject data(CaseManagementProjectData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Getdata
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseManagementProjectData getData() {
+ return data;
+ }
+
+ public void setData(CaseManagementProjectData 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 CaseManagementProject
+ */
+ @JsonAnySetter
+ public CaseManagementProject 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 CaseManagementProject object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CaseManagementProject caseManagementProject = (CaseManagementProject) o;
+ return Objects.equals(this.data, caseManagementProject.data)
+ && Objects.equals(this.additionalProperties, caseManagementProject.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CaseManagementProject {\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/CaseManagementProjectData.java b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProjectData.java
new file mode 100644
index 00000000000..c3022188b1c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProjectData.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;
+
+/** */
+@JsonPropertyOrder({
+ CaseManagementProjectData.JSON_PROPERTY_ID,
+ CaseManagementProjectData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CaseManagementProjectData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CaseManagementProjectDataType type = CaseManagementProjectDataType.PROJECTS;
+
+ public CaseManagementProjectData() {}
+
+ @JsonCreator
+ public CaseManagementProjectData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ CaseManagementProjectDataType type) {
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CaseManagementProjectData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the case management project.
+ *
+ * @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 CaseManagementProjectData type(CaseManagementProjectDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Projects resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseManagementProjectDataType getType() {
+ return type;
+ }
+
+ public void setType(CaseManagementProjectDataType 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 CaseManagementProjectData
+ */
+ @JsonAnySetter
+ public CaseManagementProjectData 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 CaseManagementProjectData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CaseManagementProjectData caseManagementProjectData = (CaseManagementProjectData) o;
+ return Objects.equals(this.id, caseManagementProjectData.id)
+ && Objects.equals(this.type, caseManagementProjectData.type)
+ && Objects.equals(
+ this.additionalProperties, caseManagementProjectData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CaseManagementProjectData {\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/CaseManagementProjectDataType.java b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProjectDataType.java
new file mode 100644
index 00000000000..02106beccbc
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CaseManagementProjectDataType.java
@@ -0,0 +1,56 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Projects resource type. */
+@JsonSerialize(using = CaseManagementProjectDataType.CaseManagementProjectDataTypeSerializer.class)
+public class CaseManagementProjectDataType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("projects"));
+
+ public static final CaseManagementProjectDataType PROJECTS =
+ new CaseManagementProjectDataType("projects");
+
+ CaseManagementProjectDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class CaseManagementProjectDataTypeSerializer
+ extends StdSerializer {
+ public CaseManagementProjectDataTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public CaseManagementProjectDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ CaseManagementProjectDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static CaseManagementProjectDataType fromValue(String value) {
+ return new CaseManagementProjectDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestArray.java b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestArray.java
new file mode 100644
index 00000000000..99a0c6dd9f9
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestArray.java
@@ -0,0 +1,154 @@
+/*
+ * 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;
+
+/** List of requests to create cases for security findings. */
+@JsonPropertyOrder({CreateCaseRequestArray.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateCaseRequestArray {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public CreateCaseRequestArray() {}
+
+ @JsonCreator
+ public CreateCaseRequestArray(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) {
+ this.data = data;
+ }
+
+ public CreateCaseRequestArray data(List data) {
+ this.data = data;
+ for (CreateCaseRequestData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public CreateCaseRequestArray addDataItem(CreateCaseRequestData dataItem) {
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Getdata
+ *
+ * @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 CreateCaseRequestArray
+ */
+ @JsonAnySetter
+ public CreateCaseRequestArray 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 CreateCaseRequestArray object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateCaseRequestArray createCaseRequestArray = (CreateCaseRequestArray) o;
+ return Objects.equals(this.data, createCaseRequestArray.data)
+ && Objects.equals(this.additionalProperties, createCaseRequestArray.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateCaseRequestArray {\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/CreateCaseRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestData.java
new file mode 100644
index 00000000000..2895492d618
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestData.java
@@ -0,0 +1,233 @@
+/*
+ * 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 of the case to create. */
+@JsonPropertyOrder({
+ CreateCaseRequestData.JSON_PROPERTY_ATTRIBUTES,
+ CreateCaseRequestData.JSON_PROPERTY_ID,
+ CreateCaseRequestData.JSON_PROPERTY_RELATIONSHIPS,
+ CreateCaseRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateCaseRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CreateCaseRequestDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private CreateCaseRequestDataRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CaseDataType type = CaseDataType.CASES;
+
+ public CreateCaseRequestData() {}
+
+ @JsonCreator
+ public CreateCaseRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CaseDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CreateCaseRequestData attributes(CreateCaseRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes of the case to create.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateCaseRequestDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CreateCaseRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CreateCaseRequestData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the case.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public CreateCaseRequestData relationships(CreateCaseRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships of the case to create.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateCaseRequestDataRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(CreateCaseRequestDataRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public CreateCaseRequestData type(CaseDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Cases resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseDataType getType() {
+ return type;
+ }
+
+ public void setType(CaseDataType 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 CreateCaseRequestData
+ */
+ @JsonAnySetter
+ public CreateCaseRequestData 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 CreateCaseRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateCaseRequestData createCaseRequestData = (CreateCaseRequestData) o;
+ return Objects.equals(this.attributes, createCaseRequestData.attributes)
+ && Objects.equals(this.id, createCaseRequestData.id)
+ && Objects.equals(this.relationships, createCaseRequestData.relationships)
+ && Objects.equals(this.type, createCaseRequestData.type)
+ && Objects.equals(this.additionalProperties, createCaseRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateCaseRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).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/CreateCaseRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestDataAttributes.java
new file mode 100644
index 00000000000..06d5c96adff
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestDataAttributes.java
@@ -0,0 +1,224 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes of the case to create. */
+@JsonPropertyOrder({
+ CreateCaseRequestDataAttributes.JSON_PROPERTY_ASSIGNEE_ID,
+ CreateCaseRequestDataAttributes.JSON_PROPERTY_DESCRIPTION,
+ CreateCaseRequestDataAttributes.JSON_PROPERTY_PRIORITY,
+ CreateCaseRequestDataAttributes.JSON_PROPERTY_TITLE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateCaseRequestDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ASSIGNEE_ID = "assignee_id";
+ private String assigneeId;
+
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ public static final String JSON_PROPERTY_PRIORITY = "priority";
+ private CasePriority priority = CasePriority.NOT_DEFINED;
+
+ public static final String JSON_PROPERTY_TITLE = "title";
+ private String title;
+
+ public CreateCaseRequestDataAttributes assigneeId(String assigneeId) {
+ this.assigneeId = assigneeId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the user assigned to the case.
+ *
+ * @return assigneeId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ASSIGNEE_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getAssigneeId() {
+ return assigneeId;
+ }
+
+ public void setAssigneeId(String assigneeId) {
+ this.assigneeId = assigneeId;
+ }
+
+ public CreateCaseRequestDataAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the case. If not provided, the description will be automatically generated.
+ *
+ * @return description
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public CreateCaseRequestDataAttributes priority(CasePriority priority) {
+ this.priority = priority;
+ this.unparsed |= !priority.isValid();
+ return this;
+ }
+
+ /**
+ * Case priority
+ *
+ * @return priority
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PRIORITY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CasePriority getPriority() {
+ return priority;
+ }
+
+ public void setPriority(CasePriority priority) {
+ if (!priority.isValid()) {
+ this.unparsed = true;
+ }
+ this.priority = priority;
+ }
+
+ public CreateCaseRequestDataAttributes title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * The title of the case. If not provided, the title will be automatically generated.
+ *
+ * @return title
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TITLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * 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 CreateCaseRequestDataAttributes
+ */
+ @JsonAnySetter
+ public CreateCaseRequestDataAttributes 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 CreateCaseRequestDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateCaseRequestDataAttributes createCaseRequestDataAttributes =
+ (CreateCaseRequestDataAttributes) o;
+ return Objects.equals(this.assigneeId, createCaseRequestDataAttributes.assigneeId)
+ && Objects.equals(this.description, createCaseRequestDataAttributes.description)
+ && Objects.equals(this.priority, createCaseRequestDataAttributes.priority)
+ && Objects.equals(this.title, createCaseRequestDataAttributes.title)
+ && Objects.equals(
+ this.additionalProperties, createCaseRequestDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(assigneeId, description, priority, title, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateCaseRequestDataAttributes {\n");
+ sb.append(" assigneeId: ").append(toIndentedString(assigneeId)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).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/CreateCaseRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestDataRelationships.java
new file mode 100644
index 00000000000..b42c1dd092d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateCaseRequestDataRelationships.java
@@ -0,0 +1,179 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Relationships of the case to create. */
+@JsonPropertyOrder({
+ CreateCaseRequestDataRelationships.JSON_PROPERTY_FINDINGS,
+ CreateCaseRequestDataRelationships.JSON_PROPERTY_PROJECT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateCaseRequestDataRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_FINDINGS = "findings";
+ private Findings findings;
+
+ public static final String JSON_PROPERTY_PROJECT = "project";
+ private CaseManagementProject project;
+
+ public CreateCaseRequestDataRelationships() {}
+
+ @JsonCreator
+ public CreateCaseRequestDataRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings,
+ @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT) CaseManagementProject project) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ this.project = project;
+ this.unparsed |= project.unparsed;
+ }
+
+ public CreateCaseRequestDataRelationships findings(Findings findings) {
+ this.findings = findings;
+ this.unparsed |= findings.unparsed;
+ return this;
+ }
+
+ /**
+ * A list of security findings.
+ *
+ * @return findings
+ */
+ @JsonProperty(JSON_PROPERTY_FINDINGS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Findings getFindings() {
+ return findings;
+ }
+
+ public void setFindings(Findings findings) {
+ this.findings = findings;
+ }
+
+ public CreateCaseRequestDataRelationships project(CaseManagementProject project) {
+ this.project = project;
+ this.unparsed |= project.unparsed;
+ return this;
+ }
+
+ /**
+ * Case management project.
+ *
+ * @return project
+ */
+ @JsonProperty(JSON_PROPERTY_PROJECT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CaseManagementProject getProject() {
+ return project;
+ }
+
+ public void setProject(CaseManagementProject project) {
+ this.project = project;
+ }
+
+ /**
+ * 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 CreateCaseRequestDataRelationships
+ */
+ @JsonAnySetter
+ public CreateCaseRequestDataRelationships 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 CreateCaseRequestDataRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateCaseRequestDataRelationships createCaseRequestDataRelationships =
+ (CreateCaseRequestDataRelationships) o;
+ return Objects.equals(this.findings, createCaseRequestDataRelationships.findings)
+ && Objects.equals(this.project, createCaseRequestDataRelationships.project)
+ && Objects.equals(
+ this.additionalProperties, createCaseRequestDataRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(findings, project, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateCaseRequestDataRelationships {\n");
+ sb.append(" findings: ").append(toIndentedString(findings)).append("\n");
+ sb.append(" project: ").append(toIndentedString(project)).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/CreateJiraIssueRequestArray.java b/src/main/java/com/datadog/api/client/v2/model/CreateJiraIssueRequestArray.java
new file mode 100644
index 00000000000..67aab168087
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateJiraIssueRequestArray.java
@@ -0,0 +1,198 @@
+/*
+ * 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;
+
+/** List of requests to create Jira issues for security findings. */
+@JsonPropertyOrder({
+ CreateJiraIssueRequestArray.JSON_PROPERTY_DATA,
+ CreateJiraIssueRequestArray.JSON_PROPERTY_INCLUDED
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateJiraIssueRequestArray {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_INCLUDED = "included";
+ private List included = null;
+
+ public CreateJiraIssueRequestArray() {}
+
+ @JsonCreator
+ public CreateJiraIssueRequestArray(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ List data) {
+ this.data = data;
+ }
+
+ public CreateJiraIssueRequestArray data(List data) {
+ this.data = data;
+ for (CreateJiraIssueRequestData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public CreateJiraIssueRequestArray addDataItem(CreateJiraIssueRequestData dataItem) {
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Getdata
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ public CreateJiraIssueRequestArray included(List included) {
+ this.included = included;
+ for (CreateJiraIssueRequestArrayIncluded item : included) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public CreateJiraIssueRequestArray addIncludedItem(
+ CreateJiraIssueRequestArrayIncluded includedItem) {
+ if (this.included == null) {
+ this.included = new ArrayList<>();
+ }
+ this.included.add(includedItem);
+ this.unparsed |= includedItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Getincluded
+ *
+ * @return included
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getIncluded() {
+ return included;
+ }
+
+ public void setIncluded(List included) {
+ this.included = included;
+ }
+
+ /**
+ * 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 CreateJiraIssueRequestArray
+ */
+ @JsonAnySetter
+ public CreateJiraIssueRequestArray 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 CreateJiraIssueRequestArray object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateJiraIssueRequestArray createJiraIssueRequestArray = (CreateJiraIssueRequestArray) o;
+ return Objects.equals(this.data, createJiraIssueRequestArray.data)
+ && Objects.equals(this.included, createJiraIssueRequestArray.included)
+ && Objects.equals(
+ this.additionalProperties, createJiraIssueRequestArray.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, included, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateJiraIssueRequestArray {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" included: ").append(toIndentedString(included)).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/CreateJiraIssueRequestArrayIncluded.java b/src/main/java/com/datadog/api/client/v2/model/CreateJiraIssueRequestArrayIncluded.java
new file mode 100644
index 00000000000..560f748d275
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateJiraIssueRequestArrayIncluded.java
@@ -0,0 +1,352 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(
+ using =
+ CreateJiraIssueRequestArrayIncluded.CreateJiraIssueRequestArrayIncludedDeserializer.class)
+@JsonSerialize(
+ using = CreateJiraIssueRequestArrayIncluded.CreateJiraIssueRequestArrayIncludedSerializer.class)
+public class CreateJiraIssueRequestArrayIncluded extends AbstractOpenApiSchema {
+ private static final Logger log =
+ Logger.getLogger(CreateJiraIssueRequestArrayIncluded.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class CreateJiraIssueRequestArrayIncludedSerializer
+ extends StdSerializer {
+ public CreateJiraIssueRequestArrayIncludedSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public CreateJiraIssueRequestArrayIncludedSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ CreateJiraIssueRequestArrayIncluded value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class CreateJiraIssueRequestArrayIncludedDeserializer
+ extends StdDeserializer {
+ public CreateJiraIssueRequestArrayIncludedDeserializer() {
+ this(CreateJiraIssueRequestArrayIncluded.class);
+ }
+
+ public CreateJiraIssueRequestArrayIncludedDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public CreateJiraIssueRequestArrayIncluded deserialize(
+ JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize CreateCaseRequestData
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (CreateCaseRequestData.class.equals(Integer.class)
+ || CreateCaseRequestData.class.equals(Long.class)
+ || CreateCaseRequestData.class.equals(Float.class)
+ || CreateCaseRequestData.class.equals(Double.class)
+ || CreateCaseRequestData.class.equals(Boolean.class)
+ || CreateCaseRequestData.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((CreateCaseRequestData.class.equals(Integer.class)
+ || CreateCaseRequestData.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((CreateCaseRequestData.class.equals(Float.class)
+ || CreateCaseRequestData.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (CreateCaseRequestData.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (CreateCaseRequestData.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(CreateCaseRequestData.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((CreateCaseRequestData) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'CreateCaseRequestData'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'CreateCaseRequestData'", e);
+ }
+
+ // deserialize CaseManagementProjectData
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (CaseManagementProjectData.class.equals(Integer.class)
+ || CaseManagementProjectData.class.equals(Long.class)
+ || CaseManagementProjectData.class.equals(Float.class)
+ || CaseManagementProjectData.class.equals(Double.class)
+ || CaseManagementProjectData.class.equals(Boolean.class)
+ || CaseManagementProjectData.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((CaseManagementProjectData.class.equals(Integer.class)
+ || CaseManagementProjectData.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((CaseManagementProjectData.class.equals(Float.class)
+ || CaseManagementProjectData.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (CaseManagementProjectData.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (CaseManagementProjectData.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(CaseManagementProjectData.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((CaseManagementProjectData) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'CaseManagementProjectData'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'CaseManagementProjectData'", e);
+ }
+
+ // deserialize FindingData
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (FindingData.class.equals(Integer.class)
+ || FindingData.class.equals(Long.class)
+ || FindingData.class.equals(Float.class)
+ || FindingData.class.equals(Double.class)
+ || FindingData.class.equals(Boolean.class)
+ || FindingData.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((FindingData.class.equals(Integer.class) || FindingData.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((FindingData.class.equals(Float.class) || FindingData.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (FindingData.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (FindingData.class.equals(String.class) && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(FindingData.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((FindingData) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'FindingData'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'FindingData'", e);
+ }
+
+ CreateJiraIssueRequestArrayIncluded ret = new CreateJiraIssueRequestArrayIncluded();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference