@@ -34,10 +34,12 @@ type SyntheticsTestRequest struct {
3434 DnsServer * string `json:"dnsServer,omitempty"`
3535 // DNS server port to use for DNS tests.
3636 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`.
3838 Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"`
3939 // Specifies whether or not the request follows redirects.
4040 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"`
4143 // Headers to include when performing the test.
4244 Headers map [string ]string `json:"headers,omitempty"`
4345 // Host name to perform the test with.
@@ -490,6 +492,34 @@ func (o *SyntheticsTestRequest) SetFollowRedirects(v bool) {
490492 o .FollowRedirects = & v
491493}
492494
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+
493523// GetHeaders returns the Headers field value if set, zero value otherwise.
494524func (o * SyntheticsTestRequest ) GetHeaders () map [string ]string {
495525 if o == nil || o .Headers == nil {
@@ -1042,6 +1072,9 @@ func (o SyntheticsTestRequest) MarshalJSON() ([]byte, error) {
10421072 if o .FollowRedirects != nil {
10431073 toSerialize ["follow_redirects" ] = o .FollowRedirects
10441074 }
1075+ if o .Form != nil {
1076+ toSerialize ["form" ] = o .Form
1077+ }
10451078 if o .Headers != nil {
10461079 toSerialize ["headers" ] = o .Headers
10471080 }
@@ -1120,6 +1153,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
11201153 DnsServerPort * string `json:"dnsServerPort,omitempty"`
11211154 Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"`
11221155 FollowRedirects * bool `json:"follow_redirects,omitempty"`
1156+ Form map [string ]string `json:"form,omitempty"`
11231157 Headers map [string ]string `json:"headers,omitempty"`
11241158 Host * string `json:"host,omitempty"`
11251159 HttpVersion * SyntheticsTestOptionsHTTPVersion `json:"httpVersion,omitempty"`
@@ -1144,7 +1178,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
11441178 }
11451179 additionalProperties := make (map [string ]interface {})
11461180 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" })
11481182 } else {
11491183 return err
11501184 }
@@ -1175,6 +1209,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
11751209 o .DnsServerPort = all .DnsServerPort
11761210 o .Files = all .Files
11771211 o .FollowRedirects = all .FollowRedirects
1212+ o .Form = all .Form
11781213 o .Headers = all .Headers
11791214 o .Host = all .Host
11801215 if all .HttpVersion != nil && ! all .HttpVersion .IsValid () {
0 commit comments