Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 53 additions & 33 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25834,6 +25834,14 @@ components:
FlakyTestsSearchFilter:
description: Search filter settings.
properties:
include_history:
default: false
description: |-
Whether to include the status change history for each flaky test in the response.
When set to true, each test will include a 'history' array with chronological status changes.
Defaults to false.
example: true
type: boolean
query:
default: "*"
description: |-
Expand Down Expand Up @@ -25879,14 +25887,6 @@ components:
properties:
filter:
$ref: "#/components/schemas/FlakyTestsSearchFilter"
include_history:
default: false
description: |-
Whether to include the status change history for each flaky test in the response.
When set to true, each test will include a `history` array with chronological status changes.
Defaults to false.
example: true
type: boolean
page:
$ref: "#/components/schemas/FlakyTestsSearchPageOptions"
sort:
Expand Down Expand Up @@ -57944,7 +57944,6 @@ components:
- none
- false_positive
- testing_or_maintenance
- remediated
- investigated_case_opened
- true_positive_benign
- true_positive_malicious
Expand All @@ -57954,7 +57953,6 @@ components:
- NONE
- FALSE_POSITIVE
- TESTING_OR_MAINTENANCE
- REMEDIATED
- INVESTIGATED_CASE_OPENED
- TRUE_POSITIVE_BENIGN
- TRUE_POSITIVE_MALICIOUS
Expand Down Expand Up @@ -103307,8 +103305,6 @@ paths:
schema:
$ref: "#/components/schemas/SecurityMonitoringSignalResponse"
description: OK
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
"429":
Expand Down Expand Up @@ -103346,17 +103342,25 @@ paths:
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Bad Request
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"404":
$ref: "#/components/responses/NotFoundResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Modify the triage assignee of a security signal
tags: ["Security Monitoring"]
x-codegen-request-body-name: body
Expand Down Expand Up @@ -103386,17 +103390,25 @@ paths:
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Bad Request
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"404":
$ref: "#/components/responses/NotFoundResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Change the related incidents of a security signal
tags: ["Security Monitoring"]
x-codegen-request-body-name: body
Expand Down Expand Up @@ -103426,17 +103438,25 @@ paths:
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Bad Request
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"404":
$ref: "#/components/responses/NotFoundResponse"
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Change the triage state of a security signal
tags: ["Security Monitoring"]
x-codegen-request-body-name: body
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/test-optimization/SearchFlakyTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public static void main(String[] args) {
new FlakyTestsSearchRequestAttributes()
.filter(
new FlakyTestsSearchFilter()
.includeHistory(true)
.query(
"""
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
"""))
.includeHistory(true)
.page(
new FlakyTestsSearchPageOptions()
.cursor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public static void main(String[] args) {
new FlakyTestsSearchRequestAttributes()
.filter(
new FlakyTestsSearchFilter()
.includeHistory(true)
.query(
"""
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
"""))
.includeHistory(true)
.page(
new FlakyTestsSearchPageOptions()
.cursor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public static void main(String[] args) {
.query(
"""
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
"""))
""")
.includeHistory(true))
.page(new FlakyTestsSearchPageOptions().limit(10L))
.sort(FlakyTestsSearchSort.FQN_ASCENDING)
.includeHistory(true))
.sort(FlakyTestsSearchSort.FQN_ASCENDING))
.type(FlakyTestsSearchRequestDataType.SEARCH_FLAKY_TESTS_REQUEST));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4062,7 +4062,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
Expand Down Expand Up @@ -4102,7 +4102,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"PATCH",
builder,
Expand Down Expand Up @@ -4169,7 +4169,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> result =
new CompletableFuture<>();
Expand Down Expand Up @@ -4234,7 +4234,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
Expand Down Expand Up @@ -4275,7 +4275,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"PATCH",
builder,
Expand Down Expand Up @@ -4342,7 +4342,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> result =
new CompletableFuture<>();
Expand Down Expand Up @@ -4407,7 +4407,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
Expand Down Expand Up @@ -4446,7 +4446,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"PATCH",
builder,
Expand Down Expand Up @@ -4513,7 +4513,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> result =
new CompletableFuture<>();
Expand Down Expand Up @@ -6943,7 +6943,6 @@ public CompletableFuture<SecurityMonitoringSignalResponse> getSecurityMonitoring
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,43 @@
import java.util.Objects;

/** Search filter settings. */
@JsonPropertyOrder({FlakyTestsSearchFilter.JSON_PROPERTY_QUERY})
@JsonPropertyOrder({
FlakyTestsSearchFilter.JSON_PROPERTY_INCLUDE_HISTORY,
FlakyTestsSearchFilter.JSON_PROPERTY_QUERY
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class FlakyTestsSearchFilter {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_INCLUDE_HISTORY = "include_history";
private Boolean includeHistory = false;

public static final String JSON_PROPERTY_QUERY = "query";
private String query = "*";

public FlakyTestsSearchFilter includeHistory(Boolean includeHistory) {
this.includeHistory = includeHistory;
return this;
}

/**
* Whether to include the status change history for each flaky test in the response. When set to
* true, each test will include a 'history' array with chronological status changes. Defaults to
* false.
*
* @return includeHistory
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INCLUDE_HISTORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIncludeHistory() {
return includeHistory;
}

public void setIncludeHistory(Boolean includeHistory) {
this.includeHistory = includeHistory;
}

public FlakyTestsSearchFilter query(String query) {
this.query = query;
return this;
Expand Down Expand Up @@ -106,19 +135,21 @@ public boolean equals(Object o) {
return false;
}
FlakyTestsSearchFilter flakyTestsSearchFilter = (FlakyTestsSearchFilter) o;
return Objects.equals(this.query, flakyTestsSearchFilter.query)
return Objects.equals(this.includeHistory, flakyTestsSearchFilter.includeHistory)
&& Objects.equals(this.query, flakyTestsSearchFilter.query)
&& Objects.equals(this.additionalProperties, flakyTestsSearchFilter.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(query, additionalProperties);
return Objects.hash(includeHistory, query, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FlakyTestsSearchFilter {\n");
sb.append(" includeHistory: ").append(toIndentedString(includeHistory)).append("\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Loading
Loading