@@ -34,10 +34,12 @@ type SyntheticsTestRequest struct {
34
34
DnsServer * string `json:"dnsServer,omitempty"`
35
35
// DNS server port to use for DNS tests.
36
36
DnsServerPort * string `json:"dnsServerPort,omitempty"`
37
- // Files to be used as part of the request in the test.
37
+ // Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.
38
38
Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"`
39
39
// Specifies whether or not the request follows redirects.
40
40
FollowRedirects * bool `json:"follow_redirects,omitempty"`
41
+ // Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.
42
+ Form map [string ]string `json:"form,omitempty"`
41
43
// Headers to include when performing the test.
42
44
Headers map [string ]string `json:"headers,omitempty"`
43
45
// Host name to perform the test with.
@@ -490,6 +492,34 @@ func (o *SyntheticsTestRequest) SetFollowRedirects(v bool) {
490
492
o .FollowRedirects = & v
491
493
}
492
494
495
+ // GetForm returns the Form field value if set, zero value otherwise.
496
+ func (o * SyntheticsTestRequest ) GetForm () map [string ]string {
497
+ if o == nil || o .Form == nil {
498
+ var ret map [string ]string
499
+ return ret
500
+ }
501
+ return o .Form
502
+ }
503
+
504
+ // GetFormOk returns a tuple with the Form field value if set, nil otherwise
505
+ // and a boolean to check if the value has been set.
506
+ func (o * SyntheticsTestRequest ) GetFormOk () (* map [string ]string , bool ) {
507
+ if o == nil || o .Form == nil {
508
+ return nil , false
509
+ }
510
+ return & o .Form , true
511
+ }
512
+
513
+ // HasForm returns a boolean if a field has been set.
514
+ func (o * SyntheticsTestRequest ) HasForm () bool {
515
+ return o != nil && o .Form != nil
516
+ }
517
+
518
+ // SetForm gets a reference to the given map[string]string and assigns it to the Form field.
519
+ func (o * SyntheticsTestRequest ) SetForm (v map [string ]string ) {
520
+ o .Form = v
521
+ }
522
+
493
523
// GetHeaders returns the Headers field value if set, zero value otherwise.
494
524
func (o * SyntheticsTestRequest ) GetHeaders () map [string ]string {
495
525
if o == nil || o .Headers == nil {
@@ -1042,6 +1072,9 @@ func (o SyntheticsTestRequest) MarshalJSON() ([]byte, error) {
1042
1072
if o .FollowRedirects != nil {
1043
1073
toSerialize ["follow_redirects" ] = o .FollowRedirects
1044
1074
}
1075
+ if o .Form != nil {
1076
+ toSerialize ["form" ] = o .Form
1077
+ }
1045
1078
if o .Headers != nil {
1046
1079
toSerialize ["headers" ] = o .Headers
1047
1080
}
@@ -1120,6 +1153,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
1120
1153
DnsServerPort * string `json:"dnsServerPort,omitempty"`
1121
1154
Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"`
1122
1155
FollowRedirects * bool `json:"follow_redirects,omitempty"`
1156
+ Form map [string ]string `json:"form,omitempty"`
1123
1157
Headers map [string ]string `json:"headers,omitempty"`
1124
1158
Host * string `json:"host,omitempty"`
1125
1159
HttpVersion * SyntheticsTestOptionsHTTPVersion `json:"httpVersion,omitempty"`
@@ -1144,7 +1178,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
1144
1178
}
1145
1179
additionalProperties := make (map [string ]interface {})
1146
1180
if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
1147
- datadog .DeleteKeys (additionalProperties , & []string {"allow_insecure" , "basicAuth" , "body" , "bodyType" , "callType" , "certificate" , "certificateDomains" , "checkCertificateRevocation" , "compressedJsonDescriptor" , "compressedProtoFile" , "dnsServer" , "dnsServerPort" , "files" , "follow_redirects" , "headers" , "host" , "httpVersion" , "isMessageBase64Encoded" , "message" , "metadata" , "method" , "noSavingResponseBody" , "numberOfPackets" , "persistCookies" , "port" , "proxy" , "query" , "servername" , "service" , "shouldTrackHops" , "timeout" , "url" })
1181
+ datadog .DeleteKeys (additionalProperties , & []string {"allow_insecure" , "basicAuth" , "body" , "bodyType" , "callType" , "certificate" , "certificateDomains" , "checkCertificateRevocation" , "compressedJsonDescriptor" , "compressedProtoFile" , "dnsServer" , "dnsServerPort" , "files" , "follow_redirects" , "form" , " headers" , "host" , "httpVersion" , "isMessageBase64Encoded" , "message" , "metadata" , "method" , "noSavingResponseBody" , "numberOfPackets" , "persistCookies" , "port" , "proxy" , "query" , "servername" , "service" , "shouldTrackHops" , "timeout" , "url" })
1148
1182
} else {
1149
1183
return err
1150
1184
}
@@ -1175,6 +1209,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
1175
1209
o .DnsServerPort = all .DnsServerPort
1176
1210
o .Files = all .Files
1177
1211
o .FollowRedirects = all .FollowRedirects
1212
+ o .Form = all .Form
1178
1213
o .Headers = all .Headers
1179
1214
o .Host = all .Host
1180
1215
if all .HttpVersion != nil && ! all .HttpVersion .IsValid () {
0 commit comments