Skip to content

Commit cb46a95

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add blockedRequestPatterns to synthetics browser test options (#3163)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 02b2c53 commit cb46a95

File tree

3 files changed

+53
-10
lines changed

3 files changed

+53
-10
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17343,6 +17343,11 @@ components:
1734317343
description: Allows loading insecure content for an HTTP request in an API
1734417344
test.
1734517345
type: boolean
17346+
blockedRequestPatterns:
17347+
description: Array of URL patterns to block.
17348+
items:
17349+
type: string
17350+
type: array
1734617351
checkCertificateRevocation:
1734717352
description: For SSL tests, whether or not the test should fail on revoked
1734817353
certificate in stapled OCSP.

src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptions.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@JsonPropertyOrder({
2323
SyntheticsTestOptions.JSON_PROPERTY_ACCEPT_SELF_SIGNED,
2424
SyntheticsTestOptions.JSON_PROPERTY_ALLOW_INSECURE,
25+
SyntheticsTestOptions.JSON_PROPERTY_BLOCKED_REQUEST_PATTERNS,
2526
SyntheticsTestOptions.JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION,
2627
SyntheticsTestOptions.JSON_PROPERTY_CI,
2728
SyntheticsTestOptions.JSON_PROPERTY_DEVICE_IDS,
@@ -56,6 +57,9 @@ public class SyntheticsTestOptions {
5657
public static final String JSON_PROPERTY_ALLOW_INSECURE = "allow_insecure";
5758
private Boolean allowInsecure;
5859

60+
public static final String JSON_PROPERTY_BLOCKED_REQUEST_PATTERNS = "blockedRequestPatterns";
61+
private List<String> blockedRequestPatterns = null;
62+
5963
public static final String JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION =
6064
"checkCertificateRevocation";
6165
private Boolean checkCertificateRevocation;
@@ -170,6 +174,35 @@ public void setAllowInsecure(Boolean allowInsecure) {
170174
this.allowInsecure = allowInsecure;
171175
}
172176

177+
public SyntheticsTestOptions blockedRequestPatterns(List<String> blockedRequestPatterns) {
178+
this.blockedRequestPatterns = blockedRequestPatterns;
179+
return this;
180+
}
181+
182+
public SyntheticsTestOptions addBlockedRequestPatternsItem(String blockedRequestPatternsItem) {
183+
if (this.blockedRequestPatterns == null) {
184+
this.blockedRequestPatterns = new ArrayList<>();
185+
}
186+
this.blockedRequestPatterns.add(blockedRequestPatternsItem);
187+
return this;
188+
}
189+
190+
/**
191+
* Array of URL patterns to block.
192+
*
193+
* @return blockedRequestPatterns
194+
*/
195+
@jakarta.annotation.Nullable
196+
@JsonProperty(JSON_PROPERTY_BLOCKED_REQUEST_PATTERNS)
197+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
198+
public List<String> getBlockedRequestPatterns() {
199+
return blockedRequestPatterns;
200+
}
201+
202+
public void setBlockedRequestPatterns(List<String> blockedRequestPatterns) {
203+
this.blockedRequestPatterns = blockedRequestPatterns;
204+
}
205+
173206
public SyntheticsTestOptions checkCertificateRevocation(Boolean checkCertificateRevocation) {
174207
this.checkCertificateRevocation = checkCertificateRevocation;
175208
return this;
@@ -754,6 +787,7 @@ public boolean equals(Object o) {
754787
SyntheticsTestOptions syntheticsTestOptions = (SyntheticsTestOptions) o;
755788
return Objects.equals(this.acceptSelfSigned, syntheticsTestOptions.acceptSelfSigned)
756789
&& Objects.equals(this.allowInsecure, syntheticsTestOptions.allowInsecure)
790+
&& Objects.equals(this.blockedRequestPatterns, syntheticsTestOptions.blockedRequestPatterns)
757791
&& Objects.equals(
758792
this.checkCertificateRevocation, syntheticsTestOptions.checkCertificateRevocation)
759793
&& Objects.equals(this.ci, syntheticsTestOptions.ci)
@@ -790,6 +824,7 @@ public int hashCode() {
790824
return Objects.hash(
791825
acceptSelfSigned,
792826
allowInsecure,
827+
blockedRequestPatterns,
793828
checkCertificateRevocation,
794829
ci,
795830
deviceIds,
@@ -822,6 +857,9 @@ public String toString() {
822857
sb.append("class SyntheticsTestOptions {\n");
823858
sb.append(" acceptSelfSigned: ").append(toIndentedString(acceptSelfSigned)).append("\n");
824859
sb.append(" allowInsecure: ").append(toIndentedString(allowInsecure)).append("\n");
860+
sb.append(" blockedRequestPatterns: ")
861+
.append(toIndentedString(blockedRequestPatterns))
862+
.append("\n");
825863
sb.append(" checkCertificateRevocation: ")
826864
.append(toIndentedString(checkCertificateRevocation))
827865
.append("\n");

0 commit comments

Comments
 (0)