diff --git a/.apigentools-info b/.apigentools-info
index ea78cb2b48e..77a84e504bc 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-11-07 22:36:09.628061",
- "spec_repo_commit": "8233abfb"
+ "regenerated": "2024-11-08 14:25:33.219329",
+ "spec_repo_commit": "d907813e"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-11-07 22:36:09.647241",
- "spec_repo_commit": "8233abfb"
+ "regenerated": "2024-11-08 14:25:33.237800",
+ "spec_repo_commit": "d907813e"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index ce1fe2fc60d..a3a38ebca93 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -293,6 +293,13 @@ components:
required: true
schema:
type: string
+ HistoricalJobID:
+ description: The ID of the job.
+ in: path
+ name: job_id
+ required: true
+ schema:
+ type: string
IncidentAttachmentFilterQueryParameter:
description: Specifies which types of attachments are included in the response.
explode: false
@@ -3658,6 +3665,21 @@ components:
from the other indexes
type: string
type: object
+ CalculatedField:
+ description: Calculated field.
+ properties:
+ expression:
+ description: Expression.
+ example: '@request_end_timestamp - @request_start_timestamp'
+ type: string
+ name:
+ description: Field name.
+ example: response_time
+ type: string
+ required:
+ - name
+ - expression
+ type: object
Case:
description: A case
properties:
@@ -5540,6 +5562,59 @@ components:
- IDENTITY
- GZIP
- DEFLATE
+ ConvertJobResultsToSignalsAttributes:
+ description: Attributes for converting historical job results to signals.
+ properties:
+ id:
+ description: Request ID.
+ type: string
+ jobResultIds:
+ description: Job result IDs.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ notifications:
+ description: Notifications sent.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ signalMessage:
+ description: Message of generated signals.
+ example: A large number of failed login attempts.
+ type: string
+ signalSeverity:
+ $ref: '#/components/schemas/SecurityMonitoringRuleSeverity'
+ required:
+ - jobResultIds
+ - signalSeverity
+ - signalMessage
+ - notifications
+ type: object
+ ConvertJobResultsToSignalsData:
+ description: Data for converting historical job results to signals.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ConvertJobResultsToSignalsAttributes'
+ type:
+ $ref: '#/components/schemas/ConvertJobResultsToSignalsDataType'
+ type: object
+ ConvertJobResultsToSignalsDataType:
+ description: Type of payload.
+ enum:
+ - historicalDetectionsJobResultSignalConversion
+ type: string
+ x-enum-varnames:
+ - HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION
+ ConvertJobResultsToSignalsRequest:
+ description: Request for converting historical job results to signals.
+ properties:
+ data:
+ $ref: '#/components/schemas/ConvertJobResultsToSignalsData'
+ type: object
CostAttributionAggregates:
description: An array of available aggregates.
items:
@@ -10112,6 +10187,67 @@ components:
required:
- message
type: object
+ HistoricalJobDataType:
+ description: Type of payload.
+ enum:
+ - historicalDetectionsJob
+ type: string
+ x-enum-varnames:
+ - HISTORICALDETECTIONSJOB
+ HistoricalJobListMeta:
+ description: Metadata about the list of jobs.
+ properties:
+ totalCount:
+ description: Number of jobs in the list.
+ format: int32
+ maximum: 2147483647
+ type: integer
+ type: object
+ HistoricalJobResponse:
+ description: Historical job response.
+ properties:
+ data:
+ $ref: '#/components/schemas/HistoricalJobResponseData'
+ type: object
+ HistoricalJobResponseAttributes:
+ description: Historical job attributes.
+ properties:
+ createdAt:
+ description: Time when the job was created.
+ type: string
+ createdByHandle:
+ description: The handle of the user who created the job.
+ type: string
+ createdByName:
+ description: The name of the user who created the job.
+ type: string
+ createdFromRuleId:
+ description: ID of the rule used to create the job (if it is created from
+ a rule).
+ type: string
+ jobDefinition:
+ $ref: '#/components/schemas/JobDefinition'
+ jobName:
+ description: Job name.
+ type: string
+ jobStatus:
+ description: Job status.
+ type: string
+ modifiedAt:
+ description: Last modification time of the job.
+ type: string
+ type: object
+ HistoricalJobResponseData:
+ description: Historical job response data.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/HistoricalJobResponseAttributes'
+ id:
+ description: ID of the job.
+ type: string
+ type:
+ $ref: '#/components/schemas/HistoricalJobDataType'
+ type: object
HourlyUsage:
description: Hourly usage for a product family for an org.
properties:
@@ -12542,6 +12678,140 @@ components:
description: Jira project key
type: string
type: object
+ JobCreateResponse:
+ description: Run a historical job response.
+ properties:
+ data:
+ $ref: '#/components/schemas/JobCreateResponseData'
+ type: object
+ JobCreateResponseData:
+ description: The definition of `JobCreateResponseData` object.
+ properties:
+ id:
+ description: ID of the created job.
+ type: string
+ type:
+ $ref: '#/components/schemas/HistoricalJobDataType'
+ type: object
+ JobDefinition:
+ description: Definition of a historical job.
+ properties:
+ calculatedFields:
+ description: Calculated fields.
+ items:
+ $ref: '#/components/schemas/CalculatedField'
+ type: array
+ cases:
+ description: Cases used for generating job results.
+ items:
+ $ref: '#/components/schemas/SecurityMonitoringRuleCaseCreate'
+ type: array
+ filters:
+ description: Additional queries to filter matched events before they are
+ processed. This field is deprecated for log detection, signal correlation,
+ and workload security rules.
+ items:
+ $ref: '#/components/schemas/SecurityMonitoringFilter'
+ type: array
+ from:
+ description: Starting time of data analyzed by the job.
+ example: 1729843470000
+ format: int64
+ type: integer
+ index:
+ description: Index used to load the data.
+ example: cloud_siem
+ type: string
+ message:
+ description: Message for generated results.
+ example: A large number of failed login attempts.
+ type: string
+ name:
+ description: Job name.
+ example: Excessive number of failed attempts.
+ type: string
+ options:
+ $ref: '#/components/schemas/SecurityMonitoringRuleOptions'
+ queries:
+ description: Queries for selecting logs analyzed by the job.
+ items:
+ $ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery'
+ type: array
+ referenceTables:
+ description: Reference tables for the rule.
+ items:
+ $ref: '#/components/schemas/SecurityMonitoringReferenceTable'
+ type: array
+ tags:
+ description: Tags for generated signals.
+ items:
+ type: string
+ type: array
+ thirdPartyCases:
+ description: Cases for generating results from third-party rules. Only available
+ for third-party rules.
+ example: []
+ items:
+ $ref: '#/components/schemas/SecurityMonitoringThirdPartyRuleCaseCreate'
+ type: array
+ to:
+ description: Ending time of data analyzed by the job.
+ example: 1729847070000
+ format: int64
+ type: integer
+ type:
+ description: Job type.
+ type: string
+ required:
+ - from
+ - to
+ - index
+ - name
+ - cases
+ - queries
+ - message
+ type: object
+ JobDefinitionFromRule:
+ description: Definition of a historical job based on a security monitoring rule.
+ properties:
+ caseIndex:
+ description: Index of the rule case applied by the job.
+ example: 0
+ format: int32
+ maximum: 9
+ type: integer
+ from:
+ description: Starting time of data analyzed by the job.
+ example: 1729843470000
+ format: int64
+ type: integer
+ id:
+ description: ID of the detection rule used to create the job.
+ example: abc-def-ghi
+ type: string
+ index:
+ description: Index used to load the data.
+ example: cloud_siem
+ type: string
+ notifications:
+ description: Notifications sent when the job is completed.
+ example:
+ - '@sns-cloudtrail-results'
+ items:
+ type: string
+ type: array
+ to:
+ description: Ending time of data analyzed by the job.
+ example: 1729847070000
+ format: int64
+ type: integer
+ required:
+ - id
+ - from
+ - to
+ - index
+ - caseIndex
+ type: object
LeakedKey:
description: The definition of LeakedKey object.
properties:
@@ -12772,6 +13042,17 @@ components:
- data
- meta
type: object
+ ListHistoricalJobsResponse:
+ description: List of historical jobs.
+ properties:
+ data:
+ description: Array containing the list of historical jobs.
+ items:
+ $ref: '#/components/schemas/HistoricalJobResponseData'
+ type: array
+ meta:
+ $ref: '#/components/schemas/HistoricalJobListMeta'
+ type: object
ListPowerpacksResponse:
description: Response object which includes all powerpack configurations.
properties:
@@ -19600,6 +19881,38 @@ components:
$ref: '#/components/schemas/RumMetricResponseData'
type: array
type: object
+ RunHistoricalJobRequest:
+ description: Run a historical job request.
+ properties:
+ data:
+ $ref: '#/components/schemas/RunHistoricalJobRequestData'
+ type: object
+ RunHistoricalJobRequestAttributes:
+ description: Run a historical job request.
+ properties:
+ fromRule:
+ $ref: '#/components/schemas/JobDefinitionFromRule'
+ id:
+ description: Request ID.
+ type: string
+ jobDefinition:
+ $ref: '#/components/schemas/JobDefinition'
+ type: object
+ RunHistoricalJobRequestData:
+ description: Data for running a historical job request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/RunHistoricalJobRequestAttributes'
+ type:
+ $ref: '#/components/schemas/RunHistoricalJobRequestDataType'
+ type: object
+ RunHistoricalJobRequestDataType:
+ description: Type of data.
+ enum:
+ - historicalDetectionsJobCreate
+ type: string
+ x-enum-varnames:
+ - HISTORICALDETECTIONSJOBCREATE
SAMLAssertionAttribute:
description: SAML assertion attribute.
properties:
@@ -39611,6 +39924,213 @@ paths:
permissions:
- incident_settings_write
x-unstable: '**Note**: This endpoint is deprecated.'
+ /api/v2/siem-historical-detections/jobs:
+ get:
+ description: List historical jobs.
+ operationId: ListHistoricalJobs
+ parameters:
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageNumber'
+ - description: The order of the jobs in results.
+ example: status
+ in: query
+ name: sort
+ required: false
+ schema:
+ type: string
+ - description: Query used to filter items from the fetched list.
+ example: security:attack status:high
+ in: query
+ name: filter[query]
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListHistoricalJobsResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List historical jobs
+ tags:
+ - Security Monitoring
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
+ post:
+ description: Run a historical job.
+ operationId: RunHistoricalJob
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunHistoricalJobRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JobCreateResponse'
+ description: Status created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Run a historical job
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
+ /api/v2/siem-historical-detections/jobs/signal_convert:
+ post:
+ description: Convert a job result to a signal.
+ operationId: ConvertJobResultToSignal
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ConvertJobResultsToSignalsRequest'
+ required: true
+ responses:
+ '204':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Convert a job result to a signal
+ tags:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
+ /api/v2/siem-historical-detections/jobs/{job_id}:
+ delete:
+ description: Delete an existing job.
+ operationId: DeleteHistoricalJob
+ parameters:
+ - $ref: '#/components/parameters/HistoricalJobID'
+ responses:
+ '204':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Delete an existing job
+ tags:
+ - Security Monitoring
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
+ get:
+ description: Get a job's details.
+ operationId: GetHistoricalJob
+ parameters:
+ - $ref: '#/components/parameters/HistoricalJobID'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoricalJobResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get a job's details
+ tags:
+ - Security Monitoring
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
+ /api/v2/siem-historical-detections/jobs/{job_id}/cancel:
+ patch:
+ description: Cancel a historical job.
+ operationId: CancelHistoricalJob
+ parameters:
+ - $ref: '#/components/parameters/HistoricalJobID'
+ responses:
+ '204':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Cancel a historical job
+ tags:
+ - Security Monitoring
+ x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.
+
+ Please check the documentation regularly for updates.'
/api/v2/slo/report:
post:
description: 'Create a job to generate an SLO report. The report job is processed
diff --git a/examples/v2/security-monitoring/CancelHistoricalJob.java b/examples/v2/security-monitoring/CancelHistoricalJob.java
new file mode 100644
index 00000000000..9a807dafabb
--- /dev/null
+++ b/examples/v2/security-monitoring/CancelHistoricalJob.java
@@ -0,0 +1,27 @@
+// Cancel a historical job returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.SecurityMonitoringApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
+ defaultClient.setUnstableOperationEnabled("v2.cancelHistoricalJob", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ // there is a valid "historical_job" in the system
+ String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID");
+
+ try {
+ apiInstance.cancelHistoricalJob(HISTORICAL_JOB_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#cancelHistoricalJob");
+ 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/ConvertJobResultToSignal.java b/examples/v2/security-monitoring/ConvertJobResultToSignal.java
new file mode 100644
index 00000000000..97fb282e878
--- /dev/null
+++ b/examples/v2/security-monitoring/ConvertJobResultToSignal.java
@@ -0,0 +1,43 @@
+// Convert a job result to a signal 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.ConvertJobResultsToSignalsAttributes;
+import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsData;
+import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsDataType;
+import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.convertJobResultToSignal", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ ConvertJobResultsToSignalsRequest body =
+ new ConvertJobResultsToSignalsRequest()
+ .data(
+ new ConvertJobResultsToSignalsData()
+ .attributes(
+ new ConvertJobResultsToSignalsAttributes()
+ .jobResultIds(Collections.singletonList(""))
+ .notifications(Collections.singletonList(""))
+ .signalMessage("A large number of failed login attempts.")
+ .signalSeverity(SecurityMonitoringRuleSeverity.CRITICAL))
+ .type(
+ ConvertJobResultsToSignalsDataType
+ .HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION));
+
+ try {
+ apiInstance.convertJobResultToSignal(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#convertJobResultToSignal");
+ 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/DeleteHistoricalJob.java b/examples/v2/security-monitoring/DeleteHistoricalJob.java
new file mode 100644
index 00000000000..393d437eb26
--- /dev/null
+++ b/examples/v2/security-monitoring/DeleteHistoricalJob.java
@@ -0,0 +1,23 @@
+// Delete an existing job returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.SecurityMonitoringApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteHistoricalJob", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ try {
+ apiInstance.deleteHistoricalJob("job_id");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#deleteHistoricalJob");
+ 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/GetHistoricalJob.java b/examples/v2/security-monitoring/GetHistoricalJob.java
new file mode 100644
index 00000000000..fce09111a45
--- /dev/null
+++ b/examples/v2/security-monitoring/GetHistoricalJob.java
@@ -0,0 +1,29 @@
+// Get a job's details 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.HistoricalJobResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
+ defaultClient.setUnstableOperationEnabled("v2.getHistoricalJob", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ // there is a valid "historical_job" in the system
+ String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID");
+
+ try {
+ HistoricalJobResponse result = apiInstance.getHistoricalJob(HISTORICAL_JOB_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#getHistoricalJob");
+ 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/ListHistoricalJobs.java b/examples/v2/security-monitoring/ListHistoricalJobs.java
new file mode 100644
index 00000000000..6893dcf67ab
--- /dev/null
+++ b/examples/v2/security-monitoring/ListHistoricalJobs.java
@@ -0,0 +1,32 @@
+// List historical jobs 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.api.SecurityMonitoringApi.ListHistoricalJobsOptionalParameters;
+import com.datadog.api.client.v2.model.ListHistoricalJobsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
+ defaultClient.setUnstableOperationEnabled("v2.listHistoricalJobs", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ // there is a valid "historical_job" in the system
+ String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID");
+
+ try {
+ ListHistoricalJobsResponse result =
+ apiInstance.listHistoricalJobs(
+ new ListHistoricalJobsOptionalParameters().filterQuery("id:string"));
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#listHistoricalJobs");
+ 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/RunHistoricalJob.java b/examples/v2/security-monitoring/RunHistoricalJob.java
new file mode 100644
index 00000000000..2bc7fcb6c11
--- /dev/null
+++ b/examples/v2/security-monitoring/RunHistoricalJob.java
@@ -0,0 +1,75 @@
+// Run a historical job returns "Status 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.JobCreateResponse;
+import com.datadog.api.client.v2.model.JobDefinition;
+import com.datadog.api.client.v2.model.RunHistoricalJobRequest;
+import com.datadog.api.client.v2.model.RunHistoricalJobRequestAttributes;
+import com.datadog.api.client.v2.model.RunHistoricalJobRequestData;
+import com.datadog.api.client.v2.model.RunHistoricalJobRequestDataType;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleKeepAlive;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation;
+import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity;
+import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleQuery;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
+ SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
+
+ RunHistoricalJobRequest body =
+ new RunHistoricalJobRequest()
+ .data(
+ new RunHistoricalJobRequestData()
+ .type(RunHistoricalJobRequestDataType.HISTORICALDETECTIONSJOBCREATE)
+ .attributes(
+ new RunHistoricalJobRequestAttributes()
+ .jobDefinition(
+ new JobDefinition()
+ .type("log_detection")
+ .name("Excessive number of failed attempts.")
+ .queries(
+ Collections.singletonList(
+ new SecurityMonitoringStandardRuleQuery()
+ .query("source:non_existing_src_weekend")
+ .aggregation(
+ SecurityMonitoringRuleQueryAggregation.COUNT)))
+ .cases(
+ Collections.singletonList(
+ new SecurityMonitoringRuleCaseCreate()
+ .name("Condition 1")
+ .status(SecurityMonitoringRuleSeverity.INFO)
+ .condition("a > 1")))
+ .options(
+ new SecurityMonitoringRuleOptions()
+ .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR)
+ .maxSignalDuration(
+ SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)
+ .evaluationWindow(
+ SecurityMonitoringRuleEvaluationWindow
+ .FIFTEEN_MINUTES))
+ .message("A large number of failed login attempts.")
+ .from(1730387522611L)
+ .to(1730387532611L)
+ .index("main"))));
+
+ try {
+ JobCreateResponse result = apiInstance.runHistoricalJob(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SecurityMonitoringApi#runHistoricalJob");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index de41d68be38..146b7d871ea 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -400,9 +400,15 @@ public class ApiClient {
put("v2.updateIncidentIntegration", false);
put("v2.updateIncidentTodo", false);
put("v2.updateIncidentType", false);
+ put("v2.cancelHistoricalJob", false);
+ put("v2.convertJobResultToSignal", false);
+ put("v2.deleteHistoricalJob", false);
put("v2.getFinding", false);
+ put("v2.getHistoricalJob", false);
put("v2.listFindings", false);
+ put("v2.listHistoricalJobs", false);
put("v2.muteFindings", false);
+ put("v2.runHistoricalJob", false);
put("v2.createScorecardOutcomesBatch", false);
put("v2.createScorecardRule", false);
put("v2.deleteScorecardRule", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java
index 3fa3ab9830d..7ec756ded2a 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
@@ -7,12 +7,17 @@
import com.datadog.api.client.Pair;
import com.datadog.api.client.v2.model.BulkMuteFindingsRequest;
import com.datadog.api.client.v2.model.BulkMuteFindingsResponse;
+import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest;
import com.datadog.api.client.v2.model.Finding;
import com.datadog.api.client.v2.model.FindingEvaluation;
import com.datadog.api.client.v2.model.FindingStatus;
import com.datadog.api.client.v2.model.FindingVulnerabilityType;
import com.datadog.api.client.v2.model.GetFindingResponse;
+import com.datadog.api.client.v2.model.HistoricalJobResponse;
+import com.datadog.api.client.v2.model.JobCreateResponse;
import com.datadog.api.client.v2.model.ListFindingsResponse;
+import com.datadog.api.client.v2.model.ListHistoricalJobsResponse;
+import com.datadog.api.client.v2.model.RunHistoricalJobRequest;
import com.datadog.api.client.v2.model.SecurityFilterCreateRequest;
import com.datadog.api.client.v2.model.SecurityFilterResponse;
import com.datadog.api.client.v2.model.SecurityFilterUpdateRequest;
@@ -81,6 +86,158 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Cancel a historical job.
+ *
+ *
See {@link #cancelHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void cancelHistoricalJob(String jobId) throws ApiException {
+ cancelHistoricalJobWithHttpInfo(jobId);
+ }
+
+ /**
+ * Cancel a historical job.
+ *
+ *
See {@link #cancelHistoricalJobWithHttpInfoAsync}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture cancelHistoricalJobAsync(String jobId) {
+ return cancelHistoricalJobWithHttpInfoAsync(jobId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Cancel a historical job.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Concurrent Modification | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse cancelHistoricalJobWithHttpInfo(String jobId) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "cancelHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'jobId' when calling cancelHistoricalJob");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/siem-historical-detections/jobs/{job_id}/cancel"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.cancelHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Cancel a historical job.
+ *
+ * See {@link #cancelHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync(String jobId) {
+ // Check if unstable operation is enabled
+ String operationId = "cancelHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'jobId' when calling cancelHistoricalJob"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/siem-historical-detections/jobs/{job_id}/cancel"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.cancelHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
/**
* Convert an existing rule from JSON to Terraform.
*
@@ -226,6 +383,156 @@ public SecurityMonitoringRuleConvertResponse convertExistingSecurityMonitoringRu
new GenericType() {});
}
+ /**
+ * Convert a job result to a signal.
+ *
+ * See {@link #convertJobResultToSignalWithHttpInfo}.
+ *
+ * @param body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void convertJobResultToSignal(ConvertJobResultsToSignalsRequest body) throws ApiException {
+ convertJobResultToSignalWithHttpInfo(body);
+ }
+
+ /**
+ * Convert a job result to a signal.
+ *
+ *
See {@link #convertJobResultToSignalWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture convertJobResultToSignalAsync(
+ ConvertJobResultsToSignalsRequest body) {
+ return convertJobResultToSignalWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Convert a job result to a signal.
+ *
+ * @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 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Concurrent Modification | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse convertJobResultToSignalWithHttpInfo(
+ ConvertJobResultsToSignalsRequest body) throws ApiException {
+ // 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 {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling convertJobResultToSignal");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/siem-historical-detections/jobs/signal_convert";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.convertJobResultToSignal",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ 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-historical-detections/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[] {"AuthZ", "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.
*
@@ -786,6 +1093,158 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression
new GenericType() {});
}
+ /**
+ * Delete an existing job.
+ *
+ * See {@link #deleteHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteHistoricalJob(String jobId) throws ApiException {
+ deleteHistoricalJobWithHttpInfo(jobId);
+ }
+
+ /**
+ * Delete an existing job.
+ *
+ *
See {@link #deleteHistoricalJobWithHttpInfoAsync}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteHistoricalJobAsync(String jobId) {
+ return deleteHistoricalJobWithHttpInfoAsync(jobId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete an existing job.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Concurrent Modification | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteHistoricalJobWithHttpInfo(String jobId) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/siem-historical-detections/jobs/{job_id}"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.deleteHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete an existing job.
+ *
+ * See {@link #deleteHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteHistoricalJobWithHttpInfoAsync(String jobId) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/siem-historical-detections/jobs/{job_id}"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.deleteHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
/**
* Delete a security filter.
*
@@ -1875,50 +2334,203 @@ public ApiResponse getFindingWithHttpInfo(
public CompletableFuture> getFindingWithHttpInfoAsync(
String findingId, GetFindingOptionalParameters parameters) {
// Check if unstable operation is enabled
- String operationId = "getFinding";
+ String operationId = "getFinding";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'findingId' is set
+ if (findingId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'findingId' when calling getFinding"));
+ return result;
+ }
+ Long snapshotTimestamp = parameters.snapshotTimestamp;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/posture_management/findings/{finding_id}"
+ .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.getFinding",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a job's details.
+ *
+ * See {@link #getHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return HistoricalJobResponse
+ * @throws ApiException if fails to make API call
+ */
+ public HistoricalJobResponse getHistoricalJob(String jobId) throws ApiException {
+ return getHistoricalJobWithHttpInfo(jobId).getData();
+ }
+
+ /**
+ * Get a job's details.
+ *
+ *
See {@link #getHistoricalJobWithHttpInfoAsync}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture<HistoricalJobResponse>
+ */
+ public CompletableFuture getHistoricalJobAsync(String jobId) {
+ return getHistoricalJobWithHttpInfoAsync(jobId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a job's details.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return ApiResponse<HistoricalJobResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getHistoricalJobWithHttpInfo(String jobId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'jobId' when calling getHistoricalJob");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/siem-historical-detections/jobs/{job_id}"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.getHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a job's details.
+ *
+ * See {@link #getHistoricalJobWithHttpInfo}.
+ *
+ * @param jobId The ID of the job. (required)
+ * @return CompletableFuture<ApiResponse<HistoricalJobResponse>>
+ */
+ public CompletableFuture> getHistoricalJobWithHttpInfoAsync(
+ String jobId) {
+ // Check if unstable operation is enabled
+ String operationId = "getHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;
- // verify the required parameter 'findingId' is set
- if (findingId == null) {
- CompletableFuture> result = new CompletableFuture<>();
+ // verify the required parameter 'jobId' is set
+ if (jobId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400, "Missing the required parameter 'findingId' when calling getFinding"));
+ 400, "Missing the required parameter 'jobId' when calling getHistoricalJob"));
return result;
}
- Long snapshotTimestamp = parameters.snapshotTimestamp;
// create path and map variables
String localVarPath =
- "/api/v2/posture_management/findings/{finding_id}"
- .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString()));
+ "/api/v2/siem-historical-detections/jobs/{job_id}"
+ .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString()));
- List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
-
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.getFinding",
+ "v2.SecurityMonitoringApi.getHistoricalJob",
localVarPath,
- localVarQueryParams,
+ new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -1930,7 +2542,7 @@ public CompletableFuture> getFindingWithHttpInfo
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
@@ -2817,88 +3429,347 @@ public PaginationIterable listFindingsWithPagination(
* Duplicated query parameters (e.g. filter[status]=low&filter[status]=info) are
* not allowed.
*
- * Response
+ * Response
+ *
+ * The response includes an array of finding objects, pagination metadata, and a count of items
+ * that match the query.
+ *
+ *
Each finding object contains the following:
+ *
+ *
+ * - The finding ID that can be used in a
GetFinding request to retrieve the full
+ * finding details.
+ * - Core attributes, including status, evaluation, high-level resource details, muted state,
+ * and rule details.
+ *
evaluation_changed_at and resource_discovery_date time stamps.
+ * - An array of associated tags.
+ *
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<ListFindingsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request: The server cannot process the request due to invalid syntax in the request. | - |
+ * | 403 | Forbidden: Access denied | - |
+ * | 404 | Not Found: The requested finding cannot be found. | - |
+ * | 429 | Too many requests: The rate limit set by the API has been exceeded. | - |
+ *
+ */
+ public ApiResponse listFindingsWithHttpInfo(
+ ListFindingsOptionalParameters parameters) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "listFindings";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+ Long pageLimit = parameters.pageLimit;
+ Long snapshotTimestamp = parameters.snapshotTimestamp;
+ String pageCursor = parameters.pageCursor;
+ String filterTags = parameters.filterTags;
+ String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt;
+ Boolean filterMuted = parameters.filterMuted;
+ String filterRuleId = parameters.filterRuleId;
+ String filterRuleName = parameters.filterRuleName;
+ String filterResourceType = parameters.filterResourceType;
+ String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp;
+ FindingEvaluation filterEvaluation = parameters.filterEvaluation;
+ FindingStatus filterStatus = parameters.filterStatus;
+ List filterVulnerabilityType = parameters.filterVulnerabilityType;
+ // create path and map variables
+ String localVarPath = "/api/v2/posture_management/findings";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.listFindings",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List findings.
+ *
+ * See {@link #listFindingsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<ListFindingsResponse>>
+ */
+ public CompletableFuture> listFindingsWithHttpInfoAsync(
+ ListFindingsOptionalParameters parameters) {
+ // Check if unstable operation is enabled
+ String operationId = "listFindings";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+ Long pageLimit = parameters.pageLimit;
+ Long snapshotTimestamp = parameters.snapshotTimestamp;
+ String pageCursor = parameters.pageCursor;
+ String filterTags = parameters.filterTags;
+ String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt;
+ Boolean filterMuted = parameters.filterMuted;
+ String filterRuleId = parameters.filterRuleId;
+ String filterRuleName = parameters.filterRuleName;
+ String filterResourceType = parameters.filterResourceType;
+ String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp;
+ FindingEvaluation filterEvaluation = parameters.filterEvaluation;
+ FindingStatus filterStatus = parameters.filterStatus;
+ List filterVulnerabilityType = parameters.filterVulnerabilityType;
+ // create path and map variables
+ String localVarPath = "/api/v2/posture_management/findings";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.listFindings",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listHistoricalJobs. */
+ public static class ListHistoricalJobsOptionalParameters {
+ private Long pageSize;
+ private Long pageNumber;
+ private String sort;
+ private String filterQuery;
+
+ /**
+ * Set pageSize.
+ *
+ * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default
+ * to 10)
+ * @return ListHistoricalJobsOptionalParameters
+ */
+ public ListHistoricalJobsOptionalParameters pageSize(Long pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+ /**
+ * Set pageNumber.
+ *
+ * @param pageNumber Specific page number to return. (optional, default to 0)
+ * @return ListHistoricalJobsOptionalParameters
+ */
+ public ListHistoricalJobsOptionalParameters pageNumber(Long pageNumber) {
+ this.pageNumber = pageNumber;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort The order of the jobs in results. (optional)
+ * @return ListHistoricalJobsOptionalParameters
+ */
+ public ListHistoricalJobsOptionalParameters sort(String sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ /**
+ * Set filterQuery.
+ *
+ * @param filterQuery Query used to filter items from the fetched list. (optional)
+ * @return ListHistoricalJobsOptionalParameters
+ */
+ public ListHistoricalJobsOptionalParameters filterQuery(String filterQuery) {
+ this.filterQuery = filterQuery;
+ return this;
+ }
+ }
+
+ /**
+ * List historical jobs.
+ *
+ * See {@link #listHistoricalJobsWithHttpInfo}.
+ *
+ * @return ListHistoricalJobsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ListHistoricalJobsResponse listHistoricalJobs() throws ApiException {
+ return listHistoricalJobsWithHttpInfo(new ListHistoricalJobsOptionalParameters()).getData();
+ }
+
+ /**
+ * List historical jobs.
+ *
+ *
See {@link #listHistoricalJobsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<ListHistoricalJobsResponse>
+ */
+ public CompletableFuture listHistoricalJobsAsync() {
+ return listHistoricalJobsWithHttpInfoAsync(new ListHistoricalJobsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List historical jobs.
+ *
+ * See {@link #listHistoricalJobsWithHttpInfo}.
*
- *
The response includes an array of finding objects, pagination metadata, and a count of items
- * that match the query.
+ * @param parameters Optional parameters for the request.
+ * @return ListHistoricalJobsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ListHistoricalJobsResponse listHistoricalJobs(
+ ListHistoricalJobsOptionalParameters parameters) throws ApiException {
+ return listHistoricalJobsWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List historical jobs.
*
- *
Each finding object contains the following:
+ *
See {@link #listHistoricalJobsWithHttpInfoAsync}.
*
- *
- * - The finding ID that can be used in a
GetFinding request to retrieve the full
- * finding details.
- * - Core attributes, including status, evaluation, high-level resource details, muted state,
- * and rule details.
- *
evaluation_changed_at and resource_discovery_date time stamps.
- * - An array of associated tags.
- *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ListHistoricalJobsResponse>
+ */
+ public CompletableFuture listHistoricalJobsAsync(
+ ListHistoricalJobsOptionalParameters parameters) {
+ return listHistoricalJobsWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List historical jobs.
*
* @param parameters Optional parameters for the request.
- * @return ApiResponse<ListFindingsResponse>
+ * @return ApiResponse<ListHistoricalJobsResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* | Status Code | Description | Response Headers |
* | 200 | OK | - |
- * | 400 | Bad Request: The server cannot process the request due to invalid syntax in the request. | - |
- * | 403 | Forbidden: Access denied | - |
- * | 404 | Not Found: The requested finding cannot be found. | - |
- * | 429 | Too many requests: The rate limit set by the API has been exceeded. | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Not Authorized | - |
+ * | 429 | Too many requests | - |
*
*/
- public ApiResponse listFindingsWithHttpInfo(
- ListFindingsOptionalParameters parameters) throws ApiException {
+ public ApiResponse listHistoricalJobsWithHttpInfo(
+ ListHistoricalJobsOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
- String operationId = "listFindings";
+ String operationId = "listHistoricalJobs";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;
- Long pageLimit = parameters.pageLimit;
- Long snapshotTimestamp = parameters.snapshotTimestamp;
- String pageCursor = parameters.pageCursor;
- String filterTags = parameters.filterTags;
- String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt;
- Boolean filterMuted = parameters.filterMuted;
- String filterRuleId = parameters.filterRuleId;
- String filterRuleName = parameters.filterRuleName;
- String filterResourceType = parameters.filterResourceType;
- String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp;
- FindingEvaluation filterEvaluation = parameters.filterEvaluation;
- FindingStatus filterStatus = parameters.filterStatus;
- List filterVulnerabilityType = parameters.filterVulnerabilityType;
+ Long pageSize = parameters.pageSize;
+ Long pageNumber = parameters.pageNumber;
+ String sort = parameters.sort;
+ String filterQuery = parameters.filterQuery;
// create path and map variables
- String localVarPath = "/api/v2/posture_management/findings";
+ String localVarPath = "/api/v2/siem-historical-detections/jobs";
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery));
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.listFindings",
+ "v2.SecurityMonitoringApi.listHistoricalJobs",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -2913,74 +3784,50 @@ public ApiResponse listFindingsWithHttpInfo(
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * List findings.
+ * List historical jobs.
*
- * See {@link #listFindingsWithHttpInfo}.
+ *
See {@link #listHistoricalJobsWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<ListFindingsResponse>>
+ * @return CompletableFuture<ApiResponse<ListHistoricalJobsResponse>>
*/
- public CompletableFuture> listFindingsWithHttpInfoAsync(
- ListFindingsOptionalParameters parameters) {
+ public CompletableFuture>
+ listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) {
// Check if unstable operation is enabled
- String operationId = "listFindings";
+ String operationId = "listHistoricalJobs";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;
- Long pageLimit = parameters.pageLimit;
- Long snapshotTimestamp = parameters.snapshotTimestamp;
- String pageCursor = parameters.pageCursor;
- String filterTags = parameters.filterTags;
- String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt;
- Boolean filterMuted = parameters.filterMuted;
- String filterRuleId = parameters.filterRuleId;
- String filterRuleName = parameters.filterRuleName;
- String filterResourceType = parameters.filterResourceType;
- String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp;
- FindingEvaluation filterEvaluation = parameters.filterEvaluation;
- FindingStatus filterStatus = parameters.filterStatus;
- List filterVulnerabilityType = parameters.filterVulnerabilityType;
+ Long pageSize = parameters.pageSize;
+ Long pageNumber = parameters.pageNumber;
+ String sort = parameters.sort;
+ String filterQuery = parameters.filterQuery;
// create path and map variables
- String localVarPath = "/api/v2/posture_management/findings";
+ String localVarPath = "/api/v2/siem-historical-detections/jobs";
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation));
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
- localVarQueryParams.addAll(
- apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery));
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
- "v2.SecurityMonitoringApi.listFindings",
+ "v2.SecurityMonitoringApi.listHistoricalJobs",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -2988,7 +3835,7 @@ public CompletableFuture> listFindingsWithHttp
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -3000,7 +3847,7 @@ public CompletableFuture> listFindingsWithHttp
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
@@ -3919,6 +4766,156 @@ public CompletableFuture> muteFindingsWith
new GenericType() {});
}
+ /**
+ * Run a historical job.
+ *
+ * See {@link #runHistoricalJobWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return JobCreateResponse
+ * @throws ApiException if fails to make API call
+ */
+ public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException {
+ return runHistoricalJobWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Run a historical job.
+ *
+ *
See {@link #runHistoricalJobWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<JobCreateResponse>
+ */
+ public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) {
+ return runHistoricalJobWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Run a historical job.
+ *
+ * @param body (required)
+ * @return ApiResponse<JobCreateResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Status created | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Concurrent Modification | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "runHistoricalJob";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling runHistoricalJob");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/siem-historical-detections/jobs";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.runHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Run a historical job.
+ *
+ * See {@link #runHistoricalJobWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<JobCreateResponse>>
+ */
+ public CompletableFuture> runHistoricalJobWithHttpInfoAsync(
+ RunHistoricalJobRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "runHistoricalJob";
+ 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 runHistoricalJob"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/siem-historical-detections/jobs";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SecurityMonitoringApi.runHistoricalJob",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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,
+ new GenericType() {});
+ }
+
/** Manage optional parameters to searchSecurityMonitoringSignals. */
public static class SearchSecurityMonitoringSignalsOptionalParameters {
private SecurityMonitoringSignalListRequest body;
diff --git a/src/main/java/com/datadog/api/client/v2/model/CalculatedField.java b/src/main/java/com/datadog/api/client/v2/model/CalculatedField.java
new file mode 100644
index 00000000000..4ee71198a2f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CalculatedField.java
@@ -0,0 +1,170 @@
+/*
+ * 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;
+
+/** Calculated field. */
+@JsonPropertyOrder({CalculatedField.JSON_PROPERTY_EXPRESSION, CalculatedField.JSON_PROPERTY_NAME})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CalculatedField {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_EXPRESSION = "expression";
+ private String expression;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public CalculatedField() {}
+
+ @JsonCreator
+ public CalculatedField(
+ @JsonProperty(required = true, value = JSON_PROPERTY_EXPRESSION) String expression,
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) {
+ this.expression = expression;
+ this.name = name;
+ }
+
+ public CalculatedField expression(String expression) {
+ this.expression = expression;
+ return this;
+ }
+
+ /**
+ * Expression.
+ *
+ * @return expression
+ */
+ @JsonProperty(JSON_PROPERTY_EXPRESSION)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public CalculatedField name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Field name.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * 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 CalculatedField
+ */
+ @JsonAnySetter
+ public CalculatedField 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 CalculatedField object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CalculatedField calculatedField = (CalculatedField) o;
+ return Objects.equals(this.expression, calculatedField.expression)
+ && Objects.equals(this.name, calculatedField.name)
+ && Objects.equals(this.additionalProperties, calculatedField.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(expression, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CalculatedField {\n");
+ sb.append(" expression: ").append(toIndentedString(expression)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).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/ConvertJobResultsToSignalsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java
new file mode 100644
index 00000000000..c7a084a305c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java
@@ -0,0 +1,280 @@
+/*
+ * 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;
+
+/** Attributes for converting historical job results to signals. */
+@JsonPropertyOrder({
+ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_ID,
+ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_JOB_RESULT_IDS,
+ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_NOTIFICATIONS,
+ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_SIGNAL_MESSAGE,
+ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_SIGNAL_SEVERITY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ConvertJobResultsToSignalsAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_JOB_RESULT_IDS = "jobResultIds";
+ private List jobResultIds = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_NOTIFICATIONS = "notifications";
+ private List notifications = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_SIGNAL_MESSAGE = "signalMessage";
+ private String signalMessage;
+
+ public static final String JSON_PROPERTY_SIGNAL_SEVERITY = "signalSeverity";
+ private SecurityMonitoringRuleSeverity signalSeverity;
+
+ public ConvertJobResultsToSignalsAttributes() {}
+
+ @JsonCreator
+ public ConvertJobResultsToSignalsAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_JOB_RESULT_IDS)
+ List jobResultIds,
+ @JsonProperty(required = true, value = JSON_PROPERTY_NOTIFICATIONS)
+ List notifications,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SIGNAL_MESSAGE) String signalMessage,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SIGNAL_SEVERITY)
+ SecurityMonitoringRuleSeverity signalSeverity) {
+ this.jobResultIds = jobResultIds;
+ this.notifications = notifications;
+ this.signalMessage = signalMessage;
+ this.signalSeverity = signalSeverity;
+ this.unparsed |= !signalSeverity.isValid();
+ }
+
+ public ConvertJobResultsToSignalsAttributes id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Request ID.
+ *
+ * @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 ConvertJobResultsToSignalsAttributes jobResultIds(List jobResultIds) {
+ this.jobResultIds = jobResultIds;
+ return this;
+ }
+
+ public ConvertJobResultsToSignalsAttributes addJobResultIdsItem(String jobResultIdsItem) {
+ this.jobResultIds.add(jobResultIdsItem);
+ return this;
+ }
+
+ /**
+ * Job result IDs.
+ *
+ * @return jobResultIds
+ */
+ @JsonProperty(JSON_PROPERTY_JOB_RESULT_IDS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getJobResultIds() {
+ return jobResultIds;
+ }
+
+ public void setJobResultIds(List jobResultIds) {
+ this.jobResultIds = jobResultIds;
+ }
+
+ public ConvertJobResultsToSignalsAttributes notifications(List notifications) {
+ this.notifications = notifications;
+ return this;
+ }
+
+ public ConvertJobResultsToSignalsAttributes addNotificationsItem(String notificationsItem) {
+ this.notifications.add(notificationsItem);
+ return this;
+ }
+
+ /**
+ * Notifications sent.
+ *
+ * @return notifications
+ */
+ @JsonProperty(JSON_PROPERTY_NOTIFICATIONS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getNotifications() {
+ return notifications;
+ }
+
+ public void setNotifications(List notifications) {
+ this.notifications = notifications;
+ }
+
+ public ConvertJobResultsToSignalsAttributes signalMessage(String signalMessage) {
+ this.signalMessage = signalMessage;
+ return this;
+ }
+
+ /**
+ * Message of generated signals.
+ *
+ * @return signalMessage
+ */
+ @JsonProperty(JSON_PROPERTY_SIGNAL_MESSAGE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getSignalMessage() {
+ return signalMessage;
+ }
+
+ public void setSignalMessage(String signalMessage) {
+ this.signalMessage = signalMessage;
+ }
+
+ public ConvertJobResultsToSignalsAttributes signalSeverity(
+ SecurityMonitoringRuleSeverity signalSeverity) {
+ this.signalSeverity = signalSeverity;
+ this.unparsed |= !signalSeverity.isValid();
+ return this;
+ }
+
+ /**
+ * Severity of the Security Signal.
+ *
+ * @return signalSeverity
+ */
+ @JsonProperty(JSON_PROPERTY_SIGNAL_SEVERITY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public SecurityMonitoringRuleSeverity getSignalSeverity() {
+ return signalSeverity;
+ }
+
+ public void setSignalSeverity(SecurityMonitoringRuleSeverity signalSeverity) {
+ if (!signalSeverity.isValid()) {
+ this.unparsed = true;
+ }
+ this.signalSeverity = signalSeverity;
+ }
+
+ /**
+ * 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 ConvertJobResultsToSignalsAttributes
+ */
+ @JsonAnySetter
+ public ConvertJobResultsToSignalsAttributes 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 ConvertJobResultsToSignalsAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConvertJobResultsToSignalsAttributes convertJobResultsToSignalsAttributes =
+ (ConvertJobResultsToSignalsAttributes) o;
+ return Objects.equals(this.id, convertJobResultsToSignalsAttributes.id)
+ && Objects.equals(this.jobResultIds, convertJobResultsToSignalsAttributes.jobResultIds)
+ && Objects.equals(this.notifications, convertJobResultsToSignalsAttributes.notifications)
+ && Objects.equals(this.signalMessage, convertJobResultsToSignalsAttributes.signalMessage)
+ && Objects.equals(this.signalSeverity, convertJobResultsToSignalsAttributes.signalSeverity)
+ && Objects.equals(
+ this.additionalProperties, convertJobResultsToSignalsAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ id, jobResultIds, notifications, signalMessage, signalSeverity, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ConvertJobResultsToSignalsAttributes {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" jobResultIds: ").append(toIndentedString(jobResultIds)).append("\n");
+ sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n");
+ sb.append(" signalMessage: ").append(toIndentedString(signalMessage)).append("\n");
+ sb.append(" signalSeverity: ").append(toIndentedString(signalSeverity)).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/ConvertJobResultsToSignalsData.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java
new file mode 100644
index 00000000000..e654c0f92bf
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java
@@ -0,0 +1,172 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for converting historical job results to signals. */
+@JsonPropertyOrder({
+ ConvertJobResultsToSignalsData.JSON_PROPERTY_ATTRIBUTES,
+ ConvertJobResultsToSignalsData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ConvertJobResultsToSignalsData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ConvertJobResultsToSignalsAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ConvertJobResultsToSignalsDataType type;
+
+ public ConvertJobResultsToSignalsData attributes(
+ ConvertJobResultsToSignalsAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for converting historical job results to signals.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ConvertJobResultsToSignalsAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ConvertJobResultsToSignalsAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ConvertJobResultsToSignalsData type(ConvertJobResultsToSignalsDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Type of payload.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ConvertJobResultsToSignalsDataType getType() {
+ return type;
+ }
+
+ public void setType(ConvertJobResultsToSignalsDataType 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 ConvertJobResultsToSignalsData
+ */
+ @JsonAnySetter
+ public ConvertJobResultsToSignalsData 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 ConvertJobResultsToSignalsData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConvertJobResultsToSignalsData convertJobResultsToSignalsData =
+ (ConvertJobResultsToSignalsData) o;
+ return Objects.equals(this.attributes, convertJobResultsToSignalsData.attributes)
+ && Objects.equals(this.type, convertJobResultsToSignalsData.type)
+ && Objects.equals(
+ this.additionalProperties, convertJobResultsToSignalsData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ConvertJobResultsToSignalsData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsDataType.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsDataType.java
new file mode 100644
index 00000000000..53c340100fd
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsDataType.java
@@ -0,0 +1,60 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Type of payload. */
+@JsonSerialize(
+ using = ConvertJobResultsToSignalsDataType.ConvertJobResultsToSignalsDataTypeSerializer.class)
+public class ConvertJobResultsToSignalsDataType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("historicalDetectionsJobResultSignalConversion"));
+
+ public static final ConvertJobResultsToSignalsDataType
+ HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION =
+ new ConvertJobResultsToSignalsDataType("historicalDetectionsJobResultSignalConversion");
+
+ ConvertJobResultsToSignalsDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ConvertJobResultsToSignalsDataTypeSerializer
+ extends StdSerializer {
+ public ConvertJobResultsToSignalsDataTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public ConvertJobResultsToSignalsDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ConvertJobResultsToSignalsDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ConvertJobResultsToSignalsDataType fromValue(String value) {
+ return new ConvertJobResultsToSignalsDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java
new file mode 100644
index 00000000000..0548bbbcab4
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java
@@ -0,0 +1,138 @@
+/*
+ * 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 converting historical job results to signals. */
+@JsonPropertyOrder({ConvertJobResultsToSignalsRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ConvertJobResultsToSignalsRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ConvertJobResultsToSignalsData data;
+
+ public ConvertJobResultsToSignalsRequest data(ConvertJobResultsToSignalsData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for converting historical job results to signals.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ConvertJobResultsToSignalsData getData() {
+ return data;
+ }
+
+ public void setData(ConvertJobResultsToSignalsData 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 ConvertJobResultsToSignalsRequest
+ */
+ @JsonAnySetter
+ public ConvertJobResultsToSignalsRequest 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 ConvertJobResultsToSignalsRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConvertJobResultsToSignalsRequest convertJobResultsToSignalsRequest =
+ (ConvertJobResultsToSignalsRequest) o;
+ return Objects.equals(this.data, convertJobResultsToSignalsRequest.data)
+ && Objects.equals(
+ this.additionalProperties, convertJobResultsToSignalsRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ConvertJobResultsToSignalsRequest {\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/HistoricalJobDataType.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java
new file mode 100644
index 00000000000..b28fe5e04c8
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.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;
+
+/** Type of payload. */
+@JsonSerialize(using = HistoricalJobDataType.HistoricalJobDataTypeSerializer.class)
+public class HistoricalJobDataType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("historicalDetectionsJob"));
+
+ public static final HistoricalJobDataType HISTORICALDETECTIONSJOB =
+ new HistoricalJobDataType("historicalDetectionsJob");
+
+ HistoricalJobDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class HistoricalJobDataTypeSerializer extends StdSerializer {
+ public HistoricalJobDataTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public HistoricalJobDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ HistoricalJobDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static HistoricalJobDataType fromValue(String value) {
+ return new HistoricalJobDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java
new file mode 100644
index 00000000000..bee924be8a7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java
@@ -0,0 +1,135 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Metadata about the list of jobs. */
+@JsonPropertyOrder({HistoricalJobListMeta.JSON_PROPERTY_TOTAL_COUNT})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class HistoricalJobListMeta {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount";
+ private Integer totalCount;
+
+ public HistoricalJobListMeta totalCount(Integer totalCount) {
+ this.totalCount = totalCount;
+ return this;
+ }
+
+ /**
+ * Number of jobs in the list. maximum: 2147483647
+ *
+ * @return totalCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOTAL_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Integer getTotalCount() {
+ return totalCount;
+ }
+
+ public void setTotalCount(Integer totalCount) {
+ this.totalCount = totalCount;
+ }
+
+ /**
+ * 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 HistoricalJobListMeta
+ */
+ @JsonAnySetter
+ public HistoricalJobListMeta 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 HistoricalJobListMeta object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HistoricalJobListMeta historicalJobListMeta = (HistoricalJobListMeta) o;
+ return Objects.equals(this.totalCount, historicalJobListMeta.totalCount)
+ && Objects.equals(this.additionalProperties, historicalJobListMeta.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(totalCount, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HistoricalJobListMeta {\n");
+ sb.append(" totalCount: ").append(toIndentedString(totalCount)).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/HistoricalJobResponse.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java
new file mode 100644
index 00000000000..49ca926a6a2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.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;
+
+/** Historical job response. */
+@JsonPropertyOrder({HistoricalJobResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class HistoricalJobResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private HistoricalJobResponseData data;
+
+ public HistoricalJobResponse data(HistoricalJobResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Historical job response data.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public HistoricalJobResponseData getData() {
+ return data;
+ }
+
+ public void setData(HistoricalJobResponseData 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 HistoricalJobResponse
+ */
+ @JsonAnySetter
+ public HistoricalJobResponse 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 HistoricalJobResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HistoricalJobResponse historicalJobResponse = (HistoricalJobResponse) o;
+ return Objects.equals(this.data, historicalJobResponse.data)
+ && Objects.equals(this.additionalProperties, historicalJobResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HistoricalJobResponse {\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/HistoricalJobResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java
new file mode 100644
index 00000000000..3cc744fcb7c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java
@@ -0,0 +1,338 @@
+/*
+ * 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;
+
+/** Historical job attributes. */
+@JsonPropertyOrder({
+ HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_AT,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_BY_HANDLE,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_BY_NAME,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_FROM_RULE_ID,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_DEFINITION,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_NAME,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_STATUS,
+ HistoricalJobResponseAttributes.JSON_PROPERTY_MODIFIED_AT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class HistoricalJobResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CREATED_AT = "createdAt";
+ private String createdAt;
+
+ public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "createdByHandle";
+ private String createdByHandle;
+
+ public static final String JSON_PROPERTY_CREATED_BY_NAME = "createdByName";
+ private String createdByName;
+
+ public static final String JSON_PROPERTY_CREATED_FROM_RULE_ID = "createdFromRuleId";
+ private String createdFromRuleId;
+
+ public static final String JSON_PROPERTY_JOB_DEFINITION = "jobDefinition";
+ private JobDefinition jobDefinition;
+
+ public static final String JSON_PROPERTY_JOB_NAME = "jobName";
+ private String jobName;
+
+ public static final String JSON_PROPERTY_JOB_STATUS = "jobStatus";
+ private String jobStatus;
+
+ public static final String JSON_PROPERTY_MODIFIED_AT = "modifiedAt";
+ private String modifiedAt;
+
+ public HistoricalJobResponseAttributes createdAt(String createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Time when the job was created.
+ *
+ * @return createdAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(String createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public HistoricalJobResponseAttributes createdByHandle(String createdByHandle) {
+ this.createdByHandle = createdByHandle;
+ return this;
+ }
+
+ /**
+ * The handle of the user who created the job.
+ *
+ * @return createdByHandle
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCreatedByHandle() {
+ return createdByHandle;
+ }
+
+ public void setCreatedByHandle(String createdByHandle) {
+ this.createdByHandle = createdByHandle;
+ }
+
+ public HistoricalJobResponseAttributes createdByName(String createdByName) {
+ this.createdByName = createdByName;
+ return this;
+ }
+
+ /**
+ * The name of the user who created the job.
+ *
+ * @return createdByName
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCreatedByName() {
+ return createdByName;
+ }
+
+ public void setCreatedByName(String createdByName) {
+ this.createdByName = createdByName;
+ }
+
+ public HistoricalJobResponseAttributes createdFromRuleId(String createdFromRuleId) {
+ this.createdFromRuleId = createdFromRuleId;
+ return this;
+ }
+
+ /**
+ * ID of the rule used to create the job (if it is created from a rule).
+ *
+ * @return createdFromRuleId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_FROM_RULE_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCreatedFromRuleId() {
+ return createdFromRuleId;
+ }
+
+ public void setCreatedFromRuleId(String createdFromRuleId) {
+ this.createdFromRuleId = createdFromRuleId;
+ }
+
+ public HistoricalJobResponseAttributes jobDefinition(JobDefinition jobDefinition) {
+ this.jobDefinition = jobDefinition;
+ this.unparsed |= jobDefinition.unparsed;
+ return this;
+ }
+
+ /**
+ * Definition of a historical job.
+ *
+ * @return jobDefinition
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_JOB_DEFINITION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public JobDefinition getJobDefinition() {
+ return jobDefinition;
+ }
+
+ public void setJobDefinition(JobDefinition jobDefinition) {
+ this.jobDefinition = jobDefinition;
+ }
+
+ public HistoricalJobResponseAttributes jobName(String jobName) {
+ this.jobName = jobName;
+ return this;
+ }
+
+ /**
+ * Job name.
+ *
+ * @return jobName
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_JOB_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getJobName() {
+ return jobName;
+ }
+
+ public void setJobName(String jobName) {
+ this.jobName = jobName;
+ }
+
+ public HistoricalJobResponseAttributes jobStatus(String jobStatus) {
+ this.jobStatus = jobStatus;
+ return this;
+ }
+
+ /**
+ * Job status.
+ *
+ * @return jobStatus
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_JOB_STATUS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getJobStatus() {
+ return jobStatus;
+ }
+
+ public void setJobStatus(String jobStatus) {
+ this.jobStatus = jobStatus;
+ }
+
+ public HistoricalJobResponseAttributes modifiedAt(String modifiedAt) {
+ this.modifiedAt = modifiedAt;
+ return this;
+ }
+
+ /**
+ * Last modification time of the job.
+ *
+ * @return modifiedAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_MODIFIED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getModifiedAt() {
+ return modifiedAt;
+ }
+
+ public void setModifiedAt(String modifiedAt) {
+ this.modifiedAt = modifiedAt;
+ }
+
+ /**
+ * 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 HistoricalJobResponseAttributes
+ */
+ @JsonAnySetter
+ public HistoricalJobResponseAttributes 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 HistoricalJobResponseAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HistoricalJobResponseAttributes historicalJobResponseAttributes =
+ (HistoricalJobResponseAttributes) o;
+ return Objects.equals(this.createdAt, historicalJobResponseAttributes.createdAt)
+ && Objects.equals(this.createdByHandle, historicalJobResponseAttributes.createdByHandle)
+ && Objects.equals(this.createdByName, historicalJobResponseAttributes.createdByName)
+ && Objects.equals(this.createdFromRuleId, historicalJobResponseAttributes.createdFromRuleId)
+ && Objects.equals(this.jobDefinition, historicalJobResponseAttributes.jobDefinition)
+ && Objects.equals(this.jobName, historicalJobResponseAttributes.jobName)
+ && Objects.equals(this.jobStatus, historicalJobResponseAttributes.jobStatus)
+ && Objects.equals(this.modifiedAt, historicalJobResponseAttributes.modifiedAt)
+ && Objects.equals(
+ this.additionalProperties, historicalJobResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ createdAt,
+ createdByHandle,
+ createdByName,
+ createdFromRuleId,
+ jobDefinition,
+ jobName,
+ jobStatus,
+ modifiedAt,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HistoricalJobResponseAttributes {\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n");
+ sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n");
+ sb.append(" createdFromRuleId: ").append(toIndentedString(createdFromRuleId)).append("\n");
+ sb.append(" jobDefinition: ").append(toIndentedString(jobDefinition)).append("\n");
+ sb.append(" jobName: ").append(toIndentedString(jobName)).append("\n");
+ sb.append(" jobStatus: ").append(toIndentedString(jobStatus)).append("\n");
+ sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).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/HistoricalJobResponseData.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java
new file mode 100644
index 00000000000..bff7e52c787
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java
@@ -0,0 +1,197 @@
+/*
+ * 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;
+
+/** Historical job response data. */
+@JsonPropertyOrder({
+ HistoricalJobResponseData.JSON_PROPERTY_ATTRIBUTES,
+ HistoricalJobResponseData.JSON_PROPERTY_ID,
+ HistoricalJobResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class HistoricalJobResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private HistoricalJobResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private HistoricalJobDataType type;
+
+ public HistoricalJobResponseData attributes(HistoricalJobResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Historical job attributes.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public HistoricalJobResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(HistoricalJobResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public HistoricalJobResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * ID of the job.
+ *
+ * @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 HistoricalJobResponseData type(HistoricalJobDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Type of payload.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public HistoricalJobDataType getType() {
+ return type;
+ }
+
+ public void setType(HistoricalJobDataType 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 HistoricalJobResponseData
+ */
+ @JsonAnySetter
+ public HistoricalJobResponseData 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 HistoricalJobResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HistoricalJobResponseData historicalJobResponseData = (HistoricalJobResponseData) o;
+ return Objects.equals(this.attributes, historicalJobResponseData.attributes)
+ && Objects.equals(this.id, historicalJobResponseData.id)
+ && Objects.equals(this.type, historicalJobResponseData.type)
+ && Objects.equals(
+ this.additionalProperties, historicalJobResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HistoricalJobResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java
new file mode 100644
index 00000000000..e9050ef832c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.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;
+
+/** Run a historical job response. */
+@JsonPropertyOrder({JobCreateResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class JobCreateResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private JobCreateResponseData data;
+
+ public JobCreateResponse data(JobCreateResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of JobCreateResponseData object.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public JobCreateResponseData getData() {
+ return data;
+ }
+
+ public void setData(JobCreateResponseData 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 JobCreateResponse
+ */
+ @JsonAnySetter
+ public JobCreateResponse 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 JobCreateResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ JobCreateResponse jobCreateResponse = (JobCreateResponse) o;
+ return Objects.equals(this.data, jobCreateResponse.data)
+ && Objects.equals(this.additionalProperties, jobCreateResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class JobCreateResponse {\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/JobCreateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java
new file mode 100644
index 00000000000..499853d544c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java
@@ -0,0 +1,168 @@
+/*
+ * 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;
+
+/** The definition of JobCreateResponseData object. */
+@JsonPropertyOrder({
+ JobCreateResponseData.JSON_PROPERTY_ID,
+ JobCreateResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class JobCreateResponseData {
+ @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 HistoricalJobDataType type;
+
+ public JobCreateResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * ID of the created job.
+ *
+ * @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 JobCreateResponseData type(HistoricalJobDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Type of payload.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public HistoricalJobDataType getType() {
+ return type;
+ }
+
+ public void setType(HistoricalJobDataType 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 JobCreateResponseData
+ */
+ @JsonAnySetter
+ public JobCreateResponseData 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 JobCreateResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ JobCreateResponseData jobCreateResponseData = (JobCreateResponseData) o;
+ return Objects.equals(this.id, jobCreateResponseData.id)
+ && Objects.equals(this.type, jobCreateResponseData.type)
+ && Objects.equals(this.additionalProperties, jobCreateResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class JobCreateResponseData {\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/JobDefinition.java b/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java
new file mode 100644
index 00000000000..68575ddd9ff
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java
@@ -0,0 +1,600 @@
+/*
+ * 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;
+
+/** Definition of a historical job. */
+@JsonPropertyOrder({
+ JobDefinition.JSON_PROPERTY_CALCULATED_FIELDS,
+ JobDefinition.JSON_PROPERTY_CASES,
+ JobDefinition.JSON_PROPERTY_FILTERS,
+ JobDefinition.JSON_PROPERTY_FROM,
+ JobDefinition.JSON_PROPERTY_INDEX,
+ JobDefinition.JSON_PROPERTY_MESSAGE,
+ JobDefinition.JSON_PROPERTY_NAME,
+ JobDefinition.JSON_PROPERTY_OPTIONS,
+ JobDefinition.JSON_PROPERTY_QUERIES,
+ JobDefinition.JSON_PROPERTY_REFERENCE_TABLES,
+ JobDefinition.JSON_PROPERTY_TAGS,
+ JobDefinition.JSON_PROPERTY_THIRD_PARTY_CASES,
+ JobDefinition.JSON_PROPERTY_TO,
+ JobDefinition.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class JobDefinition {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CALCULATED_FIELDS = "calculatedFields";
+ private List calculatedFields = null;
+
+ public static final String JSON_PROPERTY_CASES = "cases";
+ private List cases = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_FILTERS = "filters";
+ private List filters = null;
+
+ public static final String JSON_PROPERTY_FROM = "from";
+ private Long from;
+
+ public static final String JSON_PROPERTY_INDEX = "index";
+ private String index;
+
+ public static final String JSON_PROPERTY_MESSAGE = "message";
+ private String message;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_OPTIONS = "options";
+ private SecurityMonitoringRuleOptions options;
+
+ public static final String JSON_PROPERTY_QUERIES = "queries";
+ private List queries = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_REFERENCE_TABLES = "referenceTables";
+ private List referenceTables = null;
+
+ public static final String JSON_PROPERTY_TAGS = "tags";
+ private List tags = null;
+
+ public static final String JSON_PROPERTY_THIRD_PARTY_CASES = "thirdPartyCases";
+ private List thirdPartyCases = null;
+
+ public static final String JSON_PROPERTY_TO = "to";
+ private Long to;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private String type;
+
+ public JobDefinition() {}
+
+ @JsonCreator
+ public JobDefinition(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CASES)
+ List cases,
+ @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from,
+ @JsonProperty(required = true, value = JSON_PROPERTY_INDEX) String index,
+ @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message,
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
+ @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES)
+ List queries,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) {
+ this.cases = cases;
+ this.from = from;
+ this.index = index;
+ this.message = message;
+ this.name = name;
+ this.queries = queries;
+ this.to = to;
+ }
+
+ public JobDefinition calculatedFields(List calculatedFields) {
+ this.calculatedFields = calculatedFields;
+ for (CalculatedField item : calculatedFields) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addCalculatedFieldsItem(CalculatedField calculatedFieldsItem) {
+ if (this.calculatedFields == null) {
+ this.calculatedFields = new ArrayList<>();
+ }
+ this.calculatedFields.add(calculatedFieldsItem);
+ this.unparsed |= calculatedFieldsItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Calculated fields.
+ *
+ * @return calculatedFields
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CALCULATED_FIELDS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getCalculatedFields() {
+ return calculatedFields;
+ }
+
+ public void setCalculatedFields(List calculatedFields) {
+ this.calculatedFields = calculatedFields;
+ }
+
+ public JobDefinition cases(List cases) {
+ this.cases = cases;
+ for (SecurityMonitoringRuleCaseCreate item : cases) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addCasesItem(SecurityMonitoringRuleCaseCreate casesItem) {
+ this.cases.add(casesItem);
+ this.unparsed |= casesItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Cases used for generating job results.
+ *
+ * @return cases
+ */
+ @JsonProperty(JSON_PROPERTY_CASES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getCases() {
+ return cases;
+ }
+
+ public void setCases(List cases) {
+ this.cases = cases;
+ }
+
+ public JobDefinition filters(List filters) {
+ this.filters = filters;
+ for (SecurityMonitoringFilter item : filters) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addFiltersItem(SecurityMonitoringFilter filtersItem) {
+ if (this.filters == null) {
+ this.filters = new ArrayList<>();
+ }
+ this.filters.add(filtersItem);
+ this.unparsed |= filtersItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Additional queries to filter matched events before they are processed. This field is deprecated
+ * for log detection, signal correlation, and workload security rules.
+ *
+ * @return filters
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FILTERS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getFilters() {
+ return filters;
+ }
+
+ public void setFilters(List filters) {
+ this.filters = filters;
+ }
+
+ public JobDefinition from(Long from) {
+ this.from = from;
+ return this;
+ }
+
+ /**
+ * Starting time of data analyzed by the job.
+ *
+ * @return from
+ */
+ @JsonProperty(JSON_PROPERTY_FROM)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Long getFrom() {
+ return from;
+ }
+
+ public void setFrom(Long from) {
+ this.from = from;
+ }
+
+ public JobDefinition index(String index) {
+ this.index = index;
+ return this;
+ }
+
+ /**
+ * Index used to load the data.
+ *
+ * @return index
+ */
+ @JsonProperty(JSON_PROPERTY_INDEX)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getIndex() {
+ return index;
+ }
+
+ public void setIndex(String index) {
+ this.index = index;
+ }
+
+ public JobDefinition message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Message for generated results.
+ *
+ * @return message
+ */
+ @JsonProperty(JSON_PROPERTY_MESSAGE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public JobDefinition name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Job name.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public JobDefinition options(SecurityMonitoringRuleOptions options) {
+ this.options = options;
+ this.unparsed |= options.unparsed;
+ return this;
+ }
+
+ /**
+ * Options on rules.
+ *
+ * @return options
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_OPTIONS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public SecurityMonitoringRuleOptions getOptions() {
+ return options;
+ }
+
+ public void setOptions(SecurityMonitoringRuleOptions options) {
+ this.options = options;
+ }
+
+ public JobDefinition queries(List queries) {
+ this.queries = queries;
+ for (SecurityMonitoringStandardRuleQuery item : queries) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addQueriesItem(SecurityMonitoringStandardRuleQuery queriesItem) {
+ this.queries.add(queriesItem);
+ this.unparsed |= queriesItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Queries for selecting logs analyzed by the job.
+ *
+ * @return queries
+ */
+ @JsonProperty(JSON_PROPERTY_QUERIES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getQueries() {
+ return queries;
+ }
+
+ public void setQueries(List queries) {
+ this.queries = queries;
+ }
+
+ public JobDefinition referenceTables(List referenceTables) {
+ this.referenceTables = referenceTables;
+ for (SecurityMonitoringReferenceTable item : referenceTables) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addReferenceTablesItem(
+ SecurityMonitoringReferenceTable referenceTablesItem) {
+ if (this.referenceTables == null) {
+ this.referenceTables = new ArrayList<>();
+ }
+ this.referenceTables.add(referenceTablesItem);
+ this.unparsed |= referenceTablesItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Reference tables for the rule.
+ *
+ * @return referenceTables
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REFERENCE_TABLES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getReferenceTables() {
+ return referenceTables;
+ }
+
+ public void setReferenceTables(List referenceTables) {
+ this.referenceTables = referenceTables;
+ }
+
+ public JobDefinition tags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public JobDefinition addTagsItem(String tagsItem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<>();
+ }
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * Tags for generated signals.
+ *
+ * @return tags
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getTags() {
+ return tags;
+ }
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+ public JobDefinition thirdPartyCases(
+ List thirdPartyCases) {
+ this.thirdPartyCases = thirdPartyCases;
+ for (SecurityMonitoringThirdPartyRuleCaseCreate item : thirdPartyCases) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public JobDefinition addThirdPartyCasesItem(
+ SecurityMonitoringThirdPartyRuleCaseCreate thirdPartyCasesItem) {
+ if (this.thirdPartyCases == null) {
+ this.thirdPartyCases = new ArrayList<>();
+ }
+ this.thirdPartyCases.add(thirdPartyCasesItem);
+ this.unparsed |= thirdPartyCasesItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Cases for generating results from third-party rules. Only available for third-party rules.
+ *
+ * @return thirdPartyCases
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_THIRD_PARTY_CASES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getThirdPartyCases() {
+ return thirdPartyCases;
+ }
+
+ public void setThirdPartyCases(List thirdPartyCases) {
+ this.thirdPartyCases = thirdPartyCases;
+ }
+
+ public JobDefinition to(Long to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Ending time of data analyzed by the job.
+ *
+ * @return to
+ */
+ @JsonProperty(JSON_PROPERTY_TO)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Long getTo() {
+ return to;
+ }
+
+ public void setTo(Long to) {
+ this.to = to;
+ }
+
+ public JobDefinition type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Job type.
+ *
+ * @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 JobDefinition
+ */
+ @JsonAnySetter
+ public JobDefinition 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 JobDefinition object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ JobDefinition jobDefinition = (JobDefinition) o;
+ return Objects.equals(this.calculatedFields, jobDefinition.calculatedFields)
+ && Objects.equals(this.cases, jobDefinition.cases)
+ && Objects.equals(this.filters, jobDefinition.filters)
+ && Objects.equals(this.from, jobDefinition.from)
+ && Objects.equals(this.index, jobDefinition.index)
+ && Objects.equals(this.message, jobDefinition.message)
+ && Objects.equals(this.name, jobDefinition.name)
+ && Objects.equals(this.options, jobDefinition.options)
+ && Objects.equals(this.queries, jobDefinition.queries)
+ && Objects.equals(this.referenceTables, jobDefinition.referenceTables)
+ && Objects.equals(this.tags, jobDefinition.tags)
+ && Objects.equals(this.thirdPartyCases, jobDefinition.thirdPartyCases)
+ && Objects.equals(this.to, jobDefinition.to)
+ && Objects.equals(this.type, jobDefinition.type)
+ && Objects.equals(this.additionalProperties, jobDefinition.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ calculatedFields,
+ cases,
+ filters,
+ from,
+ index,
+ message,
+ name,
+ options,
+ queries,
+ referenceTables,
+ tags,
+ thirdPartyCases,
+ to,
+ type,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class JobDefinition {\n");
+ sb.append(" calculatedFields: ").append(toIndentedString(calculatedFields)).append("\n");
+ sb.append(" cases: ").append(toIndentedString(cases)).append("\n");
+ sb.append(" filters: ").append(toIndentedString(filters)).append("\n");
+ sb.append(" from: ").append(toIndentedString(from)).append("\n");
+ sb.append(" index: ").append(toIndentedString(index)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" options: ").append(toIndentedString(options)).append("\n");
+ sb.append(" queries: ").append(toIndentedString(queries)).append("\n");
+ sb.append(" referenceTables: ").append(toIndentedString(referenceTables)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
+ sb.append(" thirdPartyCases: ").append(toIndentedString(thirdPartyCases)).append("\n");
+ sb.append(" to: ").append(toIndentedString(to)).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/JobDefinitionFromRule.java b/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java
new file mode 100644
index 00000000000..4cc15300fa1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java
@@ -0,0 +1,294 @@
+/*
+ * 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;
+
+/** Definition of a historical job based on a security monitoring rule. */
+@JsonPropertyOrder({
+ JobDefinitionFromRule.JSON_PROPERTY_CASE_INDEX,
+ JobDefinitionFromRule.JSON_PROPERTY_FROM,
+ JobDefinitionFromRule.JSON_PROPERTY_ID,
+ JobDefinitionFromRule.JSON_PROPERTY_INDEX,
+ JobDefinitionFromRule.JSON_PROPERTY_NOTIFICATIONS,
+ JobDefinitionFromRule.JSON_PROPERTY_TO
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class JobDefinitionFromRule {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CASE_INDEX = "caseIndex";
+ private Integer caseIndex;
+
+ public static final String JSON_PROPERTY_FROM = "from";
+ private Long from;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_INDEX = "index";
+ private String index;
+
+ public static final String JSON_PROPERTY_NOTIFICATIONS = "notifications";
+ private List