Skip to content

Document force_delete_dependencies for synthetics test deletion #2334

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-02 18:17:57.044233",
"spec_repo_commit": "464f0cec"
"regenerated": "2024-07-02 18:50:23.121444",
"spec_repo_commit": "fae9d797"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-02 18:17:57.062384",
"spec_repo_commit": "464f0cec"
"regenerated": "2024-07-02 18:50:23.139033",
"spec_repo_commit": "fae9d797"
}
}
}
7 changes: 7 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
@@ -14944,6 +14944,13 @@ components:

to delete.'
properties:
force_delete_dependencies:
description: 'Delete the Synthetic test even if it''s referenced by other
resources

(for example, SLOs and composite monitors).'
example: false
type: boolean
public_ids:
description: An array of Synthetic test IDs you want to delete.
example: []
Original file line number Diff line number Diff line change
@@ -19,14 +19,42 @@
import java.util.Objects;

/** A JSON list of the ID or IDs of the Synthetic tests that you want to delete. */
@JsonPropertyOrder({SyntheticsDeleteTestsPayload.JSON_PROPERTY_PUBLIC_IDS})
@JsonPropertyOrder({
SyntheticsDeleteTestsPayload.JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES,
SyntheticsDeleteTestsPayload.JSON_PROPERTY_PUBLIC_IDS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class SyntheticsDeleteTestsPayload {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES = "force_delete_dependencies";
private Boolean forceDeleteDependencies;

public static final String JSON_PROPERTY_PUBLIC_IDS = "public_ids";
private List<String> publicIds = null;

public SyntheticsDeleteTestsPayload forceDeleteDependencies(Boolean forceDeleteDependencies) {
this.forceDeleteDependencies = forceDeleteDependencies;
return this;
}

/**
* Delete the Synthetic test even if it's referenced by other resources (for example, SLOs and
* composite monitors).
*
* @return forceDeleteDependencies
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getForceDeleteDependencies() {
return forceDeleteDependencies;
}

public void setForceDeleteDependencies(Boolean forceDeleteDependencies) {
this.forceDeleteDependencies = forceDeleteDependencies;
}

public SyntheticsDeleteTestsPayload publicIds(List<String> publicIds) {
this.publicIds = publicIds;
return this;
@@ -112,20 +140,25 @@ public boolean equals(Object o) {
return false;
}
SyntheticsDeleteTestsPayload syntheticsDeleteTestsPayload = (SyntheticsDeleteTestsPayload) o;
return Objects.equals(this.publicIds, syntheticsDeleteTestsPayload.publicIds)
return Objects.equals(
this.forceDeleteDependencies, syntheticsDeleteTestsPayload.forceDeleteDependencies)
&& Objects.equals(this.publicIds, syntheticsDeleteTestsPayload.publicIds)
&& Objects.equals(
this.additionalProperties, syntheticsDeleteTestsPayload.additionalProperties);
}

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

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SyntheticsDeleteTestsPayload {\n");
sb.append(" forceDeleteDependencies: ")
.append(toIndentedString(forceDeleteDependencies))
.append("\n");
sb.append(" publicIds: ").append(toIndentedString(publicIds)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Original file line number Diff line number Diff line change
@@ -269,14 +269,14 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-ct
Scenario: Delete tests returns "- JSON format is wrong" response
Given new "DeleteTests" request
And body with value {"public_ids": []}
And body with value {"force_delete_dependencies": false, "public_ids": []}
When the request is sent
Then the response status is 400 - JSON format is wrong

@generated @skip @team:DataDog/synthetics-ct
Scenario: Delete tests returns "- Tests to be deleted can't be found" response
Given new "DeleteTests" request
And body with value {"public_ids": []}
And body with value {"force_delete_dependencies": false, "public_ids": []}
When the request is sent
Then the response status is 404 - Tests to be deleted can't be found

Loading