diff --git a/.apigentools-info b/.apigentools-info index f3e479a8ef1..de2fa38d395 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-13 12:53:06.954047", - "spec_repo_commit": "a4fc362f" + "regenerated": "2025-06-13 13:39:03.944745", + "spec_repo_commit": "9757e1ea" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-13 12:53:06.969962", - "spec_repo_commit": "a4fc362f" + "regenerated": "2025-06-13 13:39:03.961911", + "spec_repo_commit": "9757e1ea" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 176a8102160..12295323353 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17207,13 +17207,21 @@ components: description: DNS server port to use for DNS tests. type: string files: - description: Files to be used as part of the request in the test. + description: Files to be used as part of the request in the test. Only valid + if `bodyType` is `multipart/form-data`. items: $ref: '#/components/schemas/SyntheticsTestRequestBodyFile' type: array follow_redirects: description: Specifies whether or not the request follows redirects. type: boolean + form: + additionalProperties: + description: A single form entry. + type: string + description: Form to be used as part of the request in the test. Only valid + if `bodyType` is `multipart/form-data`. + type: object headers: $ref: '#/components/schemas/SyntheticsTestHeaders' host: diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java index 7aa69add93b..98021fc7530 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java @@ -34,6 +34,7 @@ SyntheticsTestRequest.JSON_PROPERTY_DNS_SERVER_PORT, SyntheticsTestRequest.JSON_PROPERTY_FILES, SyntheticsTestRequest.JSON_PROPERTY_FOLLOW_REDIRECTS, + SyntheticsTestRequest.JSON_PROPERTY_FORM, SyntheticsTestRequest.JSON_PROPERTY_HEADERS, SyntheticsTestRequest.JSON_PROPERTY_HOST, SyntheticsTestRequest.JSON_PROPERTY_HTTP_VERSION, @@ -100,6 +101,9 @@ public class SyntheticsTestRequest { public static final String JSON_PROPERTY_FOLLOW_REDIRECTS = "follow_redirects"; private Boolean followRedirects; + public static final String JSON_PROPERTY_FORM = "form"; + private Map form = null; + public static final String JSON_PROPERTY_HEADERS = "headers"; private Map headers = null; @@ -444,7 +448,8 @@ public SyntheticsTestRequest addFilesItem(SyntheticsTestRequestBodyFile filesIte } /** - * Files to be used as part of the request in the test. + * Files to be used as part of the request in the test. Only valid if bodyType is + * multipart/form-data. * * @return files */ @@ -480,6 +485,36 @@ public void setFollowRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; } + public SyntheticsTestRequest form(Map form) { + this.form = form; + return this; + } + + public SyntheticsTestRequest putFormItem(String key, String formItem) { + if (this.form == null) { + this.form = new HashMap<>(); + } + this.form.put(key, formItem); + return this; + } + + /** + * Form to be used as part of the request in the test. Only valid if bodyType is + * multipart/form-data. + * + * @return form + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getForm() { + return form; + } + + public void setForm(Map form) { + this.form = form; + } + public SyntheticsTestRequest headers(Map headers) { this.headers = headers; return this; @@ -956,6 +991,7 @@ public boolean equals(Object o) { && Objects.equals(this.dnsServerPort, syntheticsTestRequest.dnsServerPort) && Objects.equals(this.files, syntheticsTestRequest.files) && Objects.equals(this.followRedirects, syntheticsTestRequest.followRedirects) + && Objects.equals(this.form, syntheticsTestRequest.form) && Objects.equals(this.headers, syntheticsTestRequest.headers) && Objects.equals(this.host, syntheticsTestRequest.host) && Objects.equals(this.httpVersion, syntheticsTestRequest.httpVersion) @@ -994,6 +1030,7 @@ public int hashCode() { dnsServerPort, files, followRedirects, + form, headers, host, httpVersion, @@ -1039,6 +1076,7 @@ public String toString() { sb.append(" dnsServerPort: ").append(toIndentedString(dnsServerPort)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append(" followRedirects: ").append(toIndentedString(followRedirects)).append("\n"); + sb.append(" form: ").append(toIndentedString(form)).append("\n"); sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); sb.append(" host: ").append(toIndentedString(host)).append("\n"); sb.append(" httpVersion: ").append(toIndentedString(httpVersion)).append("\n");