datadog_api_client/datadogV1/model/
model_synthetics_test_request.rs

1// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2// This product includes software developed at Datadog (https://www.datadoghq.com/).
3// Copyright 2019-Present Datadog, Inc.
4use serde::de::{Error, MapAccess, Visitor};
5use serde::{Deserialize, Deserializer, Serialize};
6use serde_with::skip_serializing_none;
7use std::fmt::{self, Formatter};
8
9/// Object describing the Synthetic test request.
10#[non_exhaustive]
11#[skip_serializing_none]
12#[derive(Clone, Debug, PartialEq, Serialize)]
13pub struct SyntheticsTestRequest {
14    /// Allows loading insecure content for an HTTP request in a multistep test step.
15    #[serde(rename = "allow_insecure")]
16    pub allow_insecure: Option<bool>,
17    /// Object to handle basic authentication when performing the test.
18    #[serde(rename = "basicAuth")]
19    pub basic_auth: Option<crate::datadogV1::model::SyntheticsBasicAuth>,
20    /// Body to include in the test.
21    #[serde(rename = "body")]
22    pub body: Option<String>,
23    /// Type of the request body.
24    #[serde(rename = "bodyType")]
25    pub body_type: Option<crate::datadogV1::model::SyntheticsTestRequestBodyType>,
26    /// The type of gRPC call to perform.
27    #[serde(rename = "callType")]
28    pub call_type: Option<crate::datadogV1::model::SyntheticsTestCallType>,
29    /// Client certificate to use when performing the test request.
30    #[serde(rename = "certificate")]
31    pub certificate: Option<crate::datadogV1::model::SyntheticsTestRequestCertificate>,
32    /// By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.
33    #[serde(rename = "certificateDomains")]
34    pub certificate_domains: Option<Vec<String>>,
35    /// Check for certificate revocation.
36    #[serde(rename = "checkCertificateRevocation")]
37    pub check_certificate_revocation: Option<bool>,
38    /// A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.
39    #[serde(rename = "compressedJsonDescriptor")]
40    pub compressed_json_descriptor: Option<String>,
41    /// A protobuf file that needs to be gzipped first then base64 encoded.
42    #[serde(rename = "compressedProtoFile")]
43    pub compressed_proto_file: Option<String>,
44    /// Disable fetching intermediate certificates from AIA.
45    #[serde(rename = "disableAiaIntermediateFetching")]
46    pub disable_aia_intermediate_fetching: Option<bool>,
47    /// DNS server to use for DNS tests.
48    #[serde(rename = "dnsServer")]
49    pub dns_server: Option<String>,
50    /// DNS server port to use for DNS tests.
51    #[serde(rename = "dnsServerPort")]
52    pub dns_server_port: Option<crate::datadogV1::model::SyntheticsTestRequestDNSServerPort>,
53    /// Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.
54    #[serde(rename = "files")]
55    pub files: Option<Vec<crate::datadogV1::model::SyntheticsTestRequestBodyFile>>,
56    /// Specifies whether or not the request follows redirects.
57    #[serde(rename = "follow_redirects")]
58    pub follow_redirects: Option<bool>,
59    /// Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.
60    #[serde(rename = "form")]
61    pub form: Option<std::collections::BTreeMap<String, String>>,
62    /// Headers to include when performing the test.
63    #[serde(rename = "headers")]
64    pub headers: Option<std::collections::BTreeMap<String, String>>,
65    /// Host name to perform the test with.
66    #[serde(rename = "host")]
67    pub host: Option<String>,
68    /// HTTP version to use for a Synthetic test.
69    #[serde(rename = "httpVersion")]
70    pub http_version: Option<crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion>,
71    /// Whether the message is base64 encoded.
72    #[serde(rename = "isMessageBase64Encoded")]
73    pub is_message_base64_encoded: Option<bool>,
74    /// Message to send for UDP or WebSocket tests.
75    #[serde(rename = "message")]
76    pub message: Option<String>,
77    /// Metadata to include when performing the gRPC test.
78    #[serde(rename = "metadata")]
79    pub metadata: Option<std::collections::BTreeMap<String, String>>,
80    /// Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.
81    #[serde(rename = "method")]
82    pub method: Option<String>,
83    /// Determines whether or not to save the response body.
84    #[serde(rename = "noSavingResponseBody")]
85    pub no_saving_response_body: Option<bool>,
86    /// Number of pings to use per test.
87    #[serde(rename = "numberOfPackets")]
88    pub number_of_packets: Option<i32>,
89    /// Persist cookies across redirects.
90    #[serde(rename = "persistCookies")]
91    pub persist_cookies: Option<bool>,
92    /// Port to use when performing the test.
93    #[serde(rename = "port")]
94    pub port: Option<crate::datadogV1::model::SyntheticsTestRequestPort>,
95    /// The proxy to perform the test.
96    #[serde(rename = "proxy")]
97    pub proxy: Option<crate::datadogV1::model::SyntheticsTestRequestProxy>,
98    /// Query to use for the test.
99    #[serde(rename = "query")]
100    pub query: Option<std::collections::BTreeMap<String, serde_json::Value>>,
101    /// For SSL tests, it specifies on which server you want to initiate the TLS handshake,
102    /// allowing the server to present one of multiple possible certificates on
103    /// the same IP address and TCP port number.
104    #[serde(rename = "servername")]
105    pub servername: Option<String>,
106    /// The gRPC service on which you want to perform the gRPC call.
107    #[serde(rename = "service")]
108    pub service: Option<String>,
109    /// Turns on a traceroute probe to discover all gateways along the path to the host destination.
110    #[serde(rename = "shouldTrackHops")]
111    pub should_track_hops: Option<bool>,
112    /// Timeout in seconds for the test.
113    #[serde(rename = "timeout")]
114    pub timeout: Option<f64>,
115    /// URL to perform the test with.
116    #[serde(rename = "url")]
117    pub url: Option<String>,
118    #[serde(flatten)]
119    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
120    #[serde(skip)]
121    #[serde(default)]
122    pub(crate) _unparsed: bool,
123}
124
125impl SyntheticsTestRequest {
126    pub fn new() -> SyntheticsTestRequest {
127        SyntheticsTestRequest {
128            allow_insecure: None,
129            basic_auth: None,
130            body: None,
131            body_type: None,
132            call_type: None,
133            certificate: None,
134            certificate_domains: None,
135            check_certificate_revocation: None,
136            compressed_json_descriptor: None,
137            compressed_proto_file: None,
138            disable_aia_intermediate_fetching: None,
139            dns_server: None,
140            dns_server_port: None,
141            files: None,
142            follow_redirects: None,
143            form: None,
144            headers: None,
145            host: None,
146            http_version: None,
147            is_message_base64_encoded: None,
148            message: None,
149            metadata: None,
150            method: None,
151            no_saving_response_body: None,
152            number_of_packets: None,
153            persist_cookies: None,
154            port: None,
155            proxy: None,
156            query: None,
157            servername: None,
158            service: None,
159            should_track_hops: None,
160            timeout: None,
161            url: None,
162            additional_properties: std::collections::BTreeMap::new(),
163            _unparsed: false,
164        }
165    }
166
167    pub fn allow_insecure(mut self, value: bool) -> Self {
168        self.allow_insecure = Some(value);
169        self
170    }
171
172    pub fn basic_auth(mut self, value: crate::datadogV1::model::SyntheticsBasicAuth) -> Self {
173        self.basic_auth = Some(value);
174        self
175    }
176
177    pub fn body(mut self, value: String) -> Self {
178        self.body = Some(value);
179        self
180    }
181
182    pub fn body_type(
183        mut self,
184        value: crate::datadogV1::model::SyntheticsTestRequestBodyType,
185    ) -> Self {
186        self.body_type = Some(value);
187        self
188    }
189
190    pub fn call_type(mut self, value: crate::datadogV1::model::SyntheticsTestCallType) -> Self {
191        self.call_type = Some(value);
192        self
193    }
194
195    pub fn certificate(
196        mut self,
197        value: crate::datadogV1::model::SyntheticsTestRequestCertificate,
198    ) -> Self {
199        self.certificate = Some(value);
200        self
201    }
202
203    pub fn certificate_domains(mut self, value: Vec<String>) -> Self {
204        self.certificate_domains = Some(value);
205        self
206    }
207
208    pub fn check_certificate_revocation(mut self, value: bool) -> Self {
209        self.check_certificate_revocation = Some(value);
210        self
211    }
212
213    pub fn compressed_json_descriptor(mut self, value: String) -> Self {
214        self.compressed_json_descriptor = Some(value);
215        self
216    }
217
218    pub fn compressed_proto_file(mut self, value: String) -> Self {
219        self.compressed_proto_file = Some(value);
220        self
221    }
222
223    pub fn disable_aia_intermediate_fetching(mut self, value: bool) -> Self {
224        self.disable_aia_intermediate_fetching = Some(value);
225        self
226    }
227
228    pub fn dns_server(mut self, value: String) -> Self {
229        self.dns_server = Some(value);
230        self
231    }
232
233    pub fn dns_server_port(
234        mut self,
235        value: crate::datadogV1::model::SyntheticsTestRequestDNSServerPort,
236    ) -> Self {
237        self.dns_server_port = Some(value);
238        self
239    }
240
241    pub fn files(
242        mut self,
243        value: Vec<crate::datadogV1::model::SyntheticsTestRequestBodyFile>,
244    ) -> Self {
245        self.files = Some(value);
246        self
247    }
248
249    pub fn follow_redirects(mut self, value: bool) -> Self {
250        self.follow_redirects = Some(value);
251        self
252    }
253
254    pub fn form(mut self, value: std::collections::BTreeMap<String, String>) -> Self {
255        self.form = Some(value);
256        self
257    }
258
259    pub fn headers(mut self, value: std::collections::BTreeMap<String, String>) -> Self {
260        self.headers = Some(value);
261        self
262    }
263
264    pub fn host(mut self, value: String) -> Self {
265        self.host = Some(value);
266        self
267    }
268
269    pub fn http_version(
270        mut self,
271        value: crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion,
272    ) -> Self {
273        self.http_version = Some(value);
274        self
275    }
276
277    pub fn is_message_base64_encoded(mut self, value: bool) -> Self {
278        self.is_message_base64_encoded = Some(value);
279        self
280    }
281
282    pub fn message(mut self, value: String) -> Self {
283        self.message = Some(value);
284        self
285    }
286
287    pub fn metadata(mut self, value: std::collections::BTreeMap<String, String>) -> Self {
288        self.metadata = Some(value);
289        self
290    }
291
292    pub fn method(mut self, value: String) -> Self {
293        self.method = Some(value);
294        self
295    }
296
297    pub fn no_saving_response_body(mut self, value: bool) -> Self {
298        self.no_saving_response_body = Some(value);
299        self
300    }
301
302    pub fn number_of_packets(mut self, value: i32) -> Self {
303        self.number_of_packets = Some(value);
304        self
305    }
306
307    pub fn persist_cookies(mut self, value: bool) -> Self {
308        self.persist_cookies = Some(value);
309        self
310    }
311
312    pub fn port(mut self, value: crate::datadogV1::model::SyntheticsTestRequestPort) -> Self {
313        self.port = Some(value);
314        self
315    }
316
317    pub fn proxy(mut self, value: crate::datadogV1::model::SyntheticsTestRequestProxy) -> Self {
318        self.proxy = Some(value);
319        self
320    }
321
322    pub fn query(mut self, value: std::collections::BTreeMap<String, serde_json::Value>) -> Self {
323        self.query = Some(value);
324        self
325    }
326
327    pub fn servername(mut self, value: String) -> Self {
328        self.servername = Some(value);
329        self
330    }
331
332    pub fn service(mut self, value: String) -> Self {
333        self.service = Some(value);
334        self
335    }
336
337    pub fn should_track_hops(mut self, value: bool) -> Self {
338        self.should_track_hops = Some(value);
339        self
340    }
341
342    pub fn timeout(mut self, value: f64) -> Self {
343        self.timeout = Some(value);
344        self
345    }
346
347    pub fn url(mut self, value: String) -> Self {
348        self.url = Some(value);
349        self
350    }
351
352    pub fn additional_properties(
353        mut self,
354        value: std::collections::BTreeMap<String, serde_json::Value>,
355    ) -> Self {
356        self.additional_properties = value;
357        self
358    }
359}
360
361impl Default for SyntheticsTestRequest {
362    fn default() -> Self {
363        Self::new()
364    }
365}
366
367impl<'de> Deserialize<'de> for SyntheticsTestRequest {
368    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
369    where
370        D: Deserializer<'de>,
371    {
372        struct SyntheticsTestRequestVisitor;
373        impl<'a> Visitor<'a> for SyntheticsTestRequestVisitor {
374            type Value = SyntheticsTestRequest;
375
376            fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
377                f.write_str("a mapping")
378            }
379
380            fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
381            where
382                M: MapAccess<'a>,
383            {
384                let mut allow_insecure: Option<bool> = None;
385                let mut basic_auth: Option<crate::datadogV1::model::SyntheticsBasicAuth> = None;
386                let mut body: Option<String> = None;
387                let mut body_type: Option<crate::datadogV1::model::SyntheticsTestRequestBodyType> =
388                    None;
389                let mut call_type: Option<crate::datadogV1::model::SyntheticsTestCallType> = None;
390                let mut certificate: Option<
391                    crate::datadogV1::model::SyntheticsTestRequestCertificate,
392                > = None;
393                let mut certificate_domains: Option<Vec<String>> = None;
394                let mut check_certificate_revocation: Option<bool> = None;
395                let mut compressed_json_descriptor: Option<String> = None;
396                let mut compressed_proto_file: Option<String> = None;
397                let mut disable_aia_intermediate_fetching: Option<bool> = None;
398                let mut dns_server: Option<String> = None;
399                let mut dns_server_port: Option<
400                    crate::datadogV1::model::SyntheticsTestRequestDNSServerPort,
401                > = None;
402                let mut files: Option<Vec<crate::datadogV1::model::SyntheticsTestRequestBodyFile>> =
403                    None;
404                let mut follow_redirects: Option<bool> = None;
405                let mut form: Option<std::collections::BTreeMap<String, String>> = None;
406                let mut headers: Option<std::collections::BTreeMap<String, String>> = None;
407                let mut host: Option<String> = None;
408                let mut http_version: Option<
409                    crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion,
410                > = None;
411                let mut is_message_base64_encoded: Option<bool> = None;
412                let mut message: Option<String> = None;
413                let mut metadata: Option<std::collections::BTreeMap<String, String>> = None;
414                let mut method: Option<String> = None;
415                let mut no_saving_response_body: Option<bool> = None;
416                let mut number_of_packets: Option<i32> = None;
417                let mut persist_cookies: Option<bool> = None;
418                let mut port: Option<crate::datadogV1::model::SyntheticsTestRequestPort> = None;
419                let mut proxy: Option<crate::datadogV1::model::SyntheticsTestRequestProxy> = None;
420                let mut query: Option<std::collections::BTreeMap<String, serde_json::Value>> = None;
421                let mut servername: Option<String> = None;
422                let mut service: Option<String> = None;
423                let mut should_track_hops: Option<bool> = None;
424                let mut timeout: Option<f64> = None;
425                let mut url: Option<String> = None;
426                let mut additional_properties: std::collections::BTreeMap<
427                    String,
428                    serde_json::Value,
429                > = std::collections::BTreeMap::new();
430                let mut _unparsed = false;
431
432                while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
433                    match k.as_str() {
434                        "allow_insecure" => {
435                            if v.is_null() {
436                                continue;
437                            }
438                            allow_insecure =
439                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
440                        }
441                        "basicAuth" => {
442                            if v.is_null() {
443                                continue;
444                            }
445                            basic_auth = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
446                            if let Some(ref _basic_auth) = basic_auth {
447                                match _basic_auth {
448                                    crate::datadogV1::model::SyntheticsBasicAuth::UnparsedObject(_basic_auth) => {
449                                        _unparsed = true;
450                                    },
451                                    _ => {}
452                                }
453                            }
454                        }
455                        "body" => {
456                            if v.is_null() {
457                                continue;
458                            }
459                            body = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
460                        }
461                        "bodyType" => {
462                            if v.is_null() {
463                                continue;
464                            }
465                            body_type = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
466                            if let Some(ref _body_type) = body_type {
467                                match _body_type {
468                                    crate::datadogV1::model::SyntheticsTestRequestBodyType::UnparsedObject(_body_type) => {
469                                        _unparsed = true;
470                                    },
471                                    _ => {}
472                                }
473                            }
474                        }
475                        "callType" => {
476                            if v.is_null() {
477                                continue;
478                            }
479                            call_type = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
480                            if let Some(ref _call_type) = call_type {
481                                match _call_type {
482                                    crate::datadogV1::model::SyntheticsTestCallType::UnparsedObject(_call_type) => {
483                                        _unparsed = true;
484                                    },
485                                    _ => {}
486                                }
487                            }
488                        }
489                        "certificate" => {
490                            if v.is_null() {
491                                continue;
492                            }
493                            certificate =
494                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
495                        }
496                        "certificateDomains" => {
497                            if v.is_null() {
498                                continue;
499                            }
500                            certificate_domains =
501                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
502                        }
503                        "checkCertificateRevocation" => {
504                            if v.is_null() {
505                                continue;
506                            }
507                            check_certificate_revocation =
508                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
509                        }
510                        "compressedJsonDescriptor" => {
511                            if v.is_null() {
512                                continue;
513                            }
514                            compressed_json_descriptor =
515                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
516                        }
517                        "compressedProtoFile" => {
518                            if v.is_null() {
519                                continue;
520                            }
521                            compressed_proto_file =
522                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
523                        }
524                        "disableAiaIntermediateFetching" => {
525                            if v.is_null() {
526                                continue;
527                            }
528                            disable_aia_intermediate_fetching =
529                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
530                        }
531                        "dnsServer" => {
532                            if v.is_null() {
533                                continue;
534                            }
535                            dns_server = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
536                        }
537                        "dnsServerPort" => {
538                            if v.is_null() {
539                                continue;
540                            }
541                            dns_server_port =
542                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
543                            if let Some(ref _dns_server_port) = dns_server_port {
544                                match _dns_server_port {
545                                    crate::datadogV1::model::SyntheticsTestRequestDNSServerPort::UnparsedObject(_dns_server_port) => {
546                                        _unparsed = true;
547                                    },
548                                    _ => {}
549                                }
550                            }
551                        }
552                        "files" => {
553                            if v.is_null() {
554                                continue;
555                            }
556                            files = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
557                        }
558                        "follow_redirects" => {
559                            if v.is_null() {
560                                continue;
561                            }
562                            follow_redirects =
563                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
564                        }
565                        "form" => {
566                            if v.is_null() {
567                                continue;
568                            }
569                            form = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
570                        }
571                        "headers" => {
572                            if v.is_null() {
573                                continue;
574                            }
575                            headers = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
576                        }
577                        "host" => {
578                            if v.is_null() {
579                                continue;
580                            }
581                            host = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
582                        }
583                        "httpVersion" => {
584                            if v.is_null() {
585                                continue;
586                            }
587                            http_version =
588                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
589                            if let Some(ref _http_version) = http_version {
590                                match _http_version {
591                                    crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion::UnparsedObject(_http_version) => {
592                                        _unparsed = true;
593                                    },
594                                    _ => {}
595                                }
596                            }
597                        }
598                        "isMessageBase64Encoded" => {
599                            if v.is_null() {
600                                continue;
601                            }
602                            is_message_base64_encoded =
603                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
604                        }
605                        "message" => {
606                            if v.is_null() {
607                                continue;
608                            }
609                            message = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
610                        }
611                        "metadata" => {
612                            if v.is_null() {
613                                continue;
614                            }
615                            metadata = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
616                        }
617                        "method" => {
618                            if v.is_null() {
619                                continue;
620                            }
621                            method = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
622                        }
623                        "noSavingResponseBody" => {
624                            if v.is_null() {
625                                continue;
626                            }
627                            no_saving_response_body =
628                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
629                        }
630                        "numberOfPackets" => {
631                            if v.is_null() {
632                                continue;
633                            }
634                            number_of_packets =
635                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
636                        }
637                        "persistCookies" => {
638                            if v.is_null() {
639                                continue;
640                            }
641                            persist_cookies =
642                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
643                        }
644                        "port" => {
645                            if v.is_null() {
646                                continue;
647                            }
648                            port = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
649                            if let Some(ref _port) = port {
650                                match _port {
651                                    crate::datadogV1::model::SyntheticsTestRequestPort::UnparsedObject(_port) => {
652                                        _unparsed = true;
653                                    },
654                                    _ => {}
655                                }
656                            }
657                        }
658                        "proxy" => {
659                            if v.is_null() {
660                                continue;
661                            }
662                            proxy = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
663                        }
664                        "query" => {
665                            if v.is_null() {
666                                continue;
667                            }
668                            query = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
669                        }
670                        "servername" => {
671                            if v.is_null() {
672                                continue;
673                            }
674                            servername = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
675                        }
676                        "service" => {
677                            if v.is_null() {
678                                continue;
679                            }
680                            service = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
681                        }
682                        "shouldTrackHops" => {
683                            if v.is_null() {
684                                continue;
685                            }
686                            should_track_hops =
687                                Some(serde_json::from_value(v).map_err(M::Error::custom)?);
688                        }
689                        "timeout" => {
690                            if v.is_null() {
691                                continue;
692                            }
693                            timeout = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
694                        }
695                        "url" => {
696                            if v.is_null() {
697                                continue;
698                            }
699                            url = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
700                        }
701                        &_ => {
702                            if let Ok(value) = serde_json::from_value(v.clone()) {
703                                additional_properties.insert(k, value);
704                            }
705                        }
706                    }
707                }
708
709                let content = SyntheticsTestRequest {
710                    allow_insecure,
711                    basic_auth,
712                    body,
713                    body_type,
714                    call_type,
715                    certificate,
716                    certificate_domains,
717                    check_certificate_revocation,
718                    compressed_json_descriptor,
719                    compressed_proto_file,
720                    disable_aia_intermediate_fetching,
721                    dns_server,
722                    dns_server_port,
723                    files,
724                    follow_redirects,
725                    form,
726                    headers,
727                    host,
728                    http_version,
729                    is_message_base64_encoded,
730                    message,
731                    metadata,
732                    method,
733                    no_saving_response_body,
734                    number_of_packets,
735                    persist_cookies,
736                    port,
737                    proxy,
738                    query,
739                    servername,
740                    service,
741                    should_track_hops,
742                    timeout,
743                    url,
744                    additional_properties,
745                    _unparsed,
746                };
747
748                Ok(content)
749            }
750        }
751
752        deserializer.deserialize_any(SyntheticsTestRequestVisitor)
753    }
754}