diff --git a/.apigentools-info b/.apigentools-info index f74c6f9c868..c53cda096f6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-26 16:04:30.288372", - "spec_repo_commit": "c051b78b" + "regenerated": "2025-06-26 17:56:33.436535", + "spec_repo_commit": "76086f13" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-26 16:04:30.304279", - "spec_repo_commit": "c051b78b" + "regenerated": "2025-06-26 17:56:33.454744", + "spec_repo_commit": "76086f13" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b1cb8f55715..d5a8de2b6ae 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -19592,12 +19592,6 @@ components: 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 @@ -19628,7 +19622,6 @@ components: - from - to - index - - caseIndex type: object KindAttributes: description: Kind attributes. 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 index 4cc15300fa1..b84e3aaf6c4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java +++ b/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java @@ -21,7 +21,6 @@ /** 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, @@ -32,9 +31,6 @@ 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; @@ -54,38 +50,16 @@ public JobDefinitionFromRule() {} @JsonCreator public JobDefinitionFromRule( - @JsonProperty(required = true, value = JSON_PROPERTY_CASE_INDEX) Integer caseIndex, @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, @JsonProperty(required = true, value = JSON_PROPERTY_INDEX) String index, @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { - this.caseIndex = caseIndex; this.from = from; this.id = id; this.index = index; this.to = to; } - public JobDefinitionFromRule caseIndex(Integer caseIndex) { - this.caseIndex = caseIndex; - return this; - } - - /** - * Index of the rule case applied by the job. maximum: 9 - * - * @return caseIndex - */ - @JsonProperty(JSON_PROPERTY_CASE_INDEX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getCaseIndex() { - return caseIndex; - } - - public void setCaseIndex(Integer caseIndex) { - this.caseIndex = caseIndex; - } - public JobDefinitionFromRule from(Long from) { this.from = from; return this; @@ -251,8 +225,7 @@ public boolean equals(Object o) { return false; } JobDefinitionFromRule jobDefinitionFromRule = (JobDefinitionFromRule) o; - return Objects.equals(this.caseIndex, jobDefinitionFromRule.caseIndex) - && Objects.equals(this.from, jobDefinitionFromRule.from) + return Objects.equals(this.from, jobDefinitionFromRule.from) && Objects.equals(this.id, jobDefinitionFromRule.id) && Objects.equals(this.index, jobDefinitionFromRule.index) && Objects.equals(this.notifications, jobDefinitionFromRule.notifications) @@ -262,14 +235,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(caseIndex, from, id, index, notifications, to, additionalProperties); + return Objects.hash(from, id, index, notifications, to, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobDefinitionFromRule {\n"); - sb.append(" caseIndex: ").append(toIndentedString(caseIndex)).append("\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" index: ").append(toIndentedString(index)).append("\n"); diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze index ee3fdb952b3..376ccf5d386 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:40.192Z \ No newline at end of file +2025-06-26T16:57:47.524Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json index a332bfe5b52..86d5280c9a1 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"fromRule\":{\"caseIndex\":0,\"from\":1730201035064,\"id\":\"non-existng\",\"index\":\"main\",\"notifications\":[],\"to\":1730204635115}},\"type\":\"historicalDetectionsJobCreate\"}}" + "json": "{\"data\":{\"attributes\":{\"fromRule\":{\"from\":1730201035064,\"id\":\"non-existng\",\"index\":\"main\",\"notifications\":[],\"to\":1730204635115}},\"type\":\"historicalDetectionsJobCreate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"detail\":\"failed to get rule details\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "8056350d-00d9-df6e-525e-771fe22b1354" + "id": "6baefcd2-575a-7f9d-36bf-f35d836edcfc" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 5edcdb8e205..21524e249a1 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -1095,7 +1095,7 @@ Feature: Security Monitoring Scenario: Run a historical job returns "Not Found" response Given operation "RunHistoricalJob" enabled And new "RunHistoricalJob" request - And body with value {"data": { "type": "historicalDetectionsJobCreate", "attributes": {"fromRule": {"caseIndex": 0, "from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}} + And body with value {"data": { "type": "historicalDetectionsJobCreate", "attributes": {"fromRule": {"from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}} When the request is sent Then the response status is 404 Not Found