Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
10 changes: 9 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<String, String> form = null;

public static final String JSON_PROPERTY_HEADERS = "headers";
private Map<String, String> headers = null;

Expand Down Expand Up @@ -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 <code>bodyType</code> is
* <code>multipart/form-data</code>.
*
* @return files
*/
Expand Down Expand Up @@ -480,6 +485,36 @@ public void setFollowRedirects(Boolean followRedirects) {
this.followRedirects = followRedirects;
}

public SyntheticsTestRequest form(Map<String, String> 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 <code>bodyType</code> is
* <code>multipart/form-data</code>.
*
* @return form
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FORM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getForm() {
return form;
}

public void setForm(Map<String, String> form) {
this.form = form;
}

public SyntheticsTestRequest headers(Map<String, String> headers) {
this.headers = headers;
return this;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -994,6 +1030,7 @@ public int hashCode() {
dnsServerPort,
files,
followRedirects,
form,
headers,
host,
httpVersion,
Expand Down Expand Up @@ -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");
Expand Down