|
22 | 22 | @JsonPropertyOrder({ |
23 | 23 | SyntheticsTestOptions.JSON_PROPERTY_ACCEPT_SELF_SIGNED, |
24 | 24 | SyntheticsTestOptions.JSON_PROPERTY_ALLOW_INSECURE, |
| 25 | + SyntheticsTestOptions.JSON_PROPERTY_BLOCKED_REQUEST_PATTERNS, |
25 | 26 | SyntheticsTestOptions.JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION, |
26 | 27 | SyntheticsTestOptions.JSON_PROPERTY_CI, |
27 | 28 | SyntheticsTestOptions.JSON_PROPERTY_DEVICE_IDS, |
@@ -56,6 +57,9 @@ public class SyntheticsTestOptions { |
56 | 57 | public static final String JSON_PROPERTY_ALLOW_INSECURE = "allow_insecure"; |
57 | 58 | private Boolean allowInsecure; |
58 | 59 |
|
| 60 | + public static final String JSON_PROPERTY_BLOCKED_REQUEST_PATTERNS = "blockedRequestPatterns"; |
| 61 | + private List<String> blockedRequestPatterns = null; |
| 62 | + |
59 | 63 | public static final String JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION = |
60 | 64 | "checkCertificateRevocation"; |
61 | 65 | private Boolean checkCertificateRevocation; |
@@ -170,6 +174,35 @@ public void setAllowInsecure(Boolean allowInsecure) { |
170 | 174 | this.allowInsecure = allowInsecure; |
171 | 175 | } |
172 | 176 |
|
| 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 | + |
173 | 206 | public SyntheticsTestOptions checkCertificateRevocation(Boolean checkCertificateRevocation) { |
174 | 207 | this.checkCertificateRevocation = checkCertificateRevocation; |
175 | 208 | return this; |
@@ -754,6 +787,7 @@ public boolean equals(Object o) { |
754 | 787 | SyntheticsTestOptions syntheticsTestOptions = (SyntheticsTestOptions) o; |
755 | 788 | return Objects.equals(this.acceptSelfSigned, syntheticsTestOptions.acceptSelfSigned) |
756 | 789 | && Objects.equals(this.allowInsecure, syntheticsTestOptions.allowInsecure) |
| 790 | + && Objects.equals(this.blockedRequestPatterns, syntheticsTestOptions.blockedRequestPatterns) |
757 | 791 | && Objects.equals( |
758 | 792 | this.checkCertificateRevocation, syntheticsTestOptions.checkCertificateRevocation) |
759 | 793 | && Objects.equals(this.ci, syntheticsTestOptions.ci) |
@@ -790,6 +824,7 @@ public int hashCode() { |
790 | 824 | return Objects.hash( |
791 | 825 | acceptSelfSigned, |
792 | 826 | allowInsecure, |
| 827 | + blockedRequestPatterns, |
793 | 828 | checkCertificateRevocation, |
794 | 829 | ci, |
795 | 830 | deviceIds, |
@@ -822,6 +857,9 @@ public String toString() { |
822 | 857 | sb.append("class SyntheticsTestOptions {\n"); |
823 | 858 | sb.append(" acceptSelfSigned: ").append(toIndentedString(acceptSelfSigned)).append("\n"); |
824 | 859 | sb.append(" allowInsecure: ").append(toIndentedString(allowInsecure)).append("\n"); |
| 860 | + sb.append(" blockedRequestPatterns: ") |
| 861 | + .append(toIndentedString(blockedRequestPatterns)) |
| 862 | + .append("\n"); |
825 | 863 | sb.append(" checkCertificateRevocation: ") |
826 | 864 | .append(toIndentedString(checkCertificateRevocation)) |
827 | 865 | .append("\n"); |
|
0 commit comments