@@ -27,6 +27,8 @@ type SyntheticsTestOptions struct {
2727 DisableCsp * bool `json:"disableCsp,omitempty"`
2828 // For API HTTP test, whether or not the test should follow redirects.
2929 FollowRedirects * bool `json:"follow_redirects,omitempty"`
30+ // HTTP version to use for a Synthetic test.
31+ HttpVersion * SyntheticsTestOptionsHTTPVersion `json:"httpVersion,omitempty"`
3032 // Ignore server certificate error for browser tests.
3133 IgnoreServerCertificateError * bool `json:"ignoreServerCertificateError,omitempty"`
3234 // Timeout before declaring the initial step as failed (in seconds) for browser tests.
@@ -309,6 +311,34 @@ func (o *SyntheticsTestOptions) SetFollowRedirects(v bool) {
309311 o .FollowRedirects = & v
310312}
311313
314+ // GetHttpVersion returns the HttpVersion field value if set, zero value otherwise.
315+ func (o * SyntheticsTestOptions ) GetHttpVersion () SyntheticsTestOptionsHTTPVersion {
316+ if o == nil || o .HttpVersion == nil {
317+ var ret SyntheticsTestOptionsHTTPVersion
318+ return ret
319+ }
320+ return * o .HttpVersion
321+ }
322+
323+ // GetHttpVersionOk returns a tuple with the HttpVersion field value if set, nil otherwise
324+ // and a boolean to check if the value has been set.
325+ func (o * SyntheticsTestOptions ) GetHttpVersionOk () (* SyntheticsTestOptionsHTTPVersion , bool ) {
326+ if o == nil || o .HttpVersion == nil {
327+ return nil , false
328+ }
329+ return o .HttpVersion , true
330+ }
331+
332+ // HasHttpVersion returns a boolean if a field has been set.
333+ func (o * SyntheticsTestOptions ) HasHttpVersion () bool {
334+ return o != nil && o .HttpVersion != nil
335+ }
336+
337+ // SetHttpVersion gets a reference to the given SyntheticsTestOptionsHTTPVersion and assigns it to the HttpVersion field.
338+ func (o * SyntheticsTestOptions ) SetHttpVersion (v SyntheticsTestOptionsHTTPVersion ) {
339+ o .HttpVersion = & v
340+ }
341+
312342// GetIgnoreServerCertificateError returns the IgnoreServerCertificateError field value if set, zero value otherwise.
313343func (o * SyntheticsTestOptions ) GetIgnoreServerCertificateError () bool {
314344 if o == nil || o .IgnoreServerCertificateError == nil {
@@ -675,6 +705,9 @@ func (o SyntheticsTestOptions) MarshalJSON() ([]byte, error) {
675705 if o .FollowRedirects != nil {
676706 toSerialize ["follow_redirects" ] = o .FollowRedirects
677707 }
708+ if o .HttpVersion != nil {
709+ toSerialize ["httpVersion" ] = o .HttpVersion
710+ }
678711 if o .IgnoreServerCertificateError != nil {
679712 toSerialize ["ignoreServerCertificateError" ] = o .IgnoreServerCertificateError
680713 }
@@ -730,6 +763,7 @@ func (o *SyntheticsTestOptions) UnmarshalJSON(bytes []byte) (err error) {
730763 DisableCors * bool `json:"disableCors,omitempty"`
731764 DisableCsp * bool `json:"disableCsp,omitempty"`
732765 FollowRedirects * bool `json:"follow_redirects,omitempty"`
766+ HttpVersion * SyntheticsTestOptionsHTTPVersion `json:"httpVersion,omitempty"`
733767 IgnoreServerCertificateError * bool `json:"ignoreServerCertificateError,omitempty"`
734768 InitialNavigationTimeout * int64 `json:"initialNavigationTimeout,omitempty"`
735769 MinFailureDuration * int64 `json:"min_failure_duration,omitempty"`
@@ -752,6 +786,14 @@ func (o *SyntheticsTestOptions) UnmarshalJSON(bytes []byte) (err error) {
752786 o .UnparsedObject = raw
753787 return nil
754788 }
789+ if v := all .HttpVersion ; v != nil && ! v .IsValid () {
790+ err = json .Unmarshal (bytes , & raw )
791+ if err != nil {
792+ return err
793+ }
794+ o .UnparsedObject = raw
795+ return nil
796+ }
755797 o .AcceptSelfSigned = all .AcceptSelfSigned
756798 o .AllowInsecure = all .AllowInsecure
757799 o .CheckCertificateRevocation = all .CheckCertificateRevocation
@@ -767,6 +809,7 @@ func (o *SyntheticsTestOptions) UnmarshalJSON(bytes []byte) (err error) {
767809 o .DisableCors = all .DisableCors
768810 o .DisableCsp = all .DisableCsp
769811 o .FollowRedirects = all .FollowRedirects
812+ o .HttpVersion = all .HttpVersion
770813 o .IgnoreServerCertificateError = all .IgnoreServerCertificateError
771814 o .InitialNavigationTimeout = all .InitialNavigationTimeout
772815 o .MinFailureDuration = all .MinFailureDuration
0 commit comments