@@ -10,17 +10,17 @@ import (
1010
1111// SyntheticsFastTestResultAttributes Attributes of the fast test result.
1212type SyntheticsFastTestResultAttributes struct {
13- // Device information for browser-based fast tests.
14- Device * SyntheticsFastTestResultDevice `json:"device,omitempty"`
15- // Location from which the fast test was executed .
16- Location * SyntheticsFastTestResultLocation `json:"location,omitempty"`
13+ // Device information for the test result ( browser and mobile tests) .
14+ Device * SyntheticsTestResultDevice `json:"device,omitempty"`
15+ // Location information for a Synthetic test result .
16+ Location * SyntheticsTestResultLocation `json:"location,omitempty"`
1717 // Detailed result data for the fast test run. The exact shape of nested fields
1818 // (`request`, `response`, `assertions`, etc.) depends on the test subtype.
1919 Result * SyntheticsFastTestResultDetail `json:"result,omitempty"`
2020 // Subtype of the Synthetic test that produced this result.
2121 TestSubType * SyntheticsFastTestSubType `json:"test_sub_type,omitempty"`
22- // The type of the Synthetic test that produced this result (for example, `api` or `browser`) .
23- TestType * string `json:"test_type,omitempty"`
22+ // Type of the Synthetic fast test that produced this result.
23+ TestType * SyntheticsFastTestType `json:"test_type,omitempty"`
2424 // Version of the test at the time the fast test was triggered.
2525 TestVersion * int64 `json:"test_version,omitempty"`
2626 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -46,17 +46,17 @@ func NewSyntheticsFastTestResultAttributesWithDefaults() *SyntheticsFastTestResu
4646}
4747
4848// GetDevice returns the Device field value if set, zero value otherwise.
49- func (o * SyntheticsFastTestResultAttributes ) GetDevice () SyntheticsFastTestResultDevice {
49+ func (o * SyntheticsFastTestResultAttributes ) GetDevice () SyntheticsTestResultDevice {
5050 if o == nil || o .Device == nil {
51- var ret SyntheticsFastTestResultDevice
51+ var ret SyntheticsTestResultDevice
5252 return ret
5353 }
5454 return * o .Device
5555}
5656
5757// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise
5858// and a boolean to check if the value has been set.
59- func (o * SyntheticsFastTestResultAttributes ) GetDeviceOk () (* SyntheticsFastTestResultDevice , bool ) {
59+ func (o * SyntheticsFastTestResultAttributes ) GetDeviceOk () (* SyntheticsTestResultDevice , bool ) {
6060 if o == nil || o .Device == nil {
6161 return nil , false
6262 }
@@ -68,23 +68,23 @@ func (o *SyntheticsFastTestResultAttributes) HasDevice() bool {
6868 return o != nil && o .Device != nil
6969}
7070
71- // SetDevice gets a reference to the given SyntheticsFastTestResultDevice and assigns it to the Device field.
72- func (o * SyntheticsFastTestResultAttributes ) SetDevice (v SyntheticsFastTestResultDevice ) {
71+ // SetDevice gets a reference to the given SyntheticsTestResultDevice and assigns it to the Device field.
72+ func (o * SyntheticsFastTestResultAttributes ) SetDevice (v SyntheticsTestResultDevice ) {
7373 o .Device = & v
7474}
7575
7676// GetLocation returns the Location field value if set, zero value otherwise.
77- func (o * SyntheticsFastTestResultAttributes ) GetLocation () SyntheticsFastTestResultLocation {
77+ func (o * SyntheticsFastTestResultAttributes ) GetLocation () SyntheticsTestResultLocation {
7878 if o == nil || o .Location == nil {
79- var ret SyntheticsFastTestResultLocation
79+ var ret SyntheticsTestResultLocation
8080 return ret
8181 }
8282 return * o .Location
8383}
8484
8585// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
8686// and a boolean to check if the value has been set.
87- func (o * SyntheticsFastTestResultAttributes ) GetLocationOk () (* SyntheticsFastTestResultLocation , bool ) {
87+ func (o * SyntheticsFastTestResultAttributes ) GetLocationOk () (* SyntheticsTestResultLocation , bool ) {
8888 if o == nil || o .Location == nil {
8989 return nil , false
9090 }
@@ -96,8 +96,8 @@ func (o *SyntheticsFastTestResultAttributes) HasLocation() bool {
9696 return o != nil && o .Location != nil
9797}
9898
99- // SetLocation gets a reference to the given SyntheticsFastTestResultLocation and assigns it to the Location field.
100- func (o * SyntheticsFastTestResultAttributes ) SetLocation (v SyntheticsFastTestResultLocation ) {
99+ // SetLocation gets a reference to the given SyntheticsTestResultLocation and assigns it to the Location field.
100+ func (o * SyntheticsFastTestResultAttributes ) SetLocation (v SyntheticsTestResultLocation ) {
101101 o .Location = & v
102102}
103103
@@ -158,17 +158,17 @@ func (o *SyntheticsFastTestResultAttributes) SetTestSubType(v SyntheticsFastTest
158158}
159159
160160// GetTestType returns the TestType field value if set, zero value otherwise.
161- func (o * SyntheticsFastTestResultAttributes ) GetTestType () string {
161+ func (o * SyntheticsFastTestResultAttributes ) GetTestType () SyntheticsFastTestType {
162162 if o == nil || o .TestType == nil {
163- var ret string
163+ var ret SyntheticsFastTestType
164164 return ret
165165 }
166166 return * o .TestType
167167}
168168
169169// GetTestTypeOk returns a tuple with the TestType field value if set, nil otherwise
170170// and a boolean to check if the value has been set.
171- func (o * SyntheticsFastTestResultAttributes ) GetTestTypeOk () (* string , bool ) {
171+ func (o * SyntheticsFastTestResultAttributes ) GetTestTypeOk () (* SyntheticsFastTestType , bool ) {
172172 if o == nil || o .TestType == nil {
173173 return nil , false
174174 }
@@ -180,8 +180,8 @@ func (o *SyntheticsFastTestResultAttributes) HasTestType() bool {
180180 return o != nil && o .TestType != nil
181181}
182182
183- // SetTestType gets a reference to the given string and assigns it to the TestType field.
184- func (o * SyntheticsFastTestResultAttributes ) SetTestType (v string ) {
183+ // SetTestType gets a reference to the given SyntheticsFastTestType and assigns it to the TestType field.
184+ func (o * SyntheticsFastTestResultAttributes ) SetTestType (v SyntheticsFastTestType ) {
185185 o .TestType = & v
186186}
187187
@@ -247,12 +247,12 @@ func (o SyntheticsFastTestResultAttributes) MarshalJSON() ([]byte, error) {
247247// UnmarshalJSON deserializes the given payload.
248248func (o * SyntheticsFastTestResultAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
249249 all := struct {
250- Device * SyntheticsFastTestResultDevice `json:"device,omitempty"`
251- Location * SyntheticsFastTestResultLocation `json:"location,omitempty"`
252- Result * SyntheticsFastTestResultDetail `json:"result,omitempty"`
253- TestSubType * SyntheticsFastTestSubType `json:"test_sub_type,omitempty"`
254- TestType * string `json:"test_type,omitempty"`
255- TestVersion * int64 `json:"test_version,omitempty"`
250+ Device * SyntheticsTestResultDevice `json:"device,omitempty"`
251+ Location * SyntheticsTestResultLocation `json:"location,omitempty"`
252+ Result * SyntheticsFastTestResultDetail `json:"result,omitempty"`
253+ TestSubType * SyntheticsFastTestSubType `json:"test_sub_type,omitempty"`
254+ TestType * SyntheticsFastTestType `json:"test_type,omitempty"`
255+ TestVersion * int64 `json:"test_version,omitempty"`
256256 }{}
257257 if err = datadog .Unmarshal (bytes , & all ); err != nil {
258258 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -282,7 +282,11 @@ func (o *SyntheticsFastTestResultAttributes) UnmarshalJSON(bytes []byte) (err er
282282 } else {
283283 o .TestSubType = all .TestSubType
284284 }
285- o .TestType = all .TestType
285+ if all .TestType != nil && ! all .TestType .IsValid () {
286+ hasInvalidField = true
287+ } else {
288+ o .TestType = all .TestType
289+ }
286290 o .TestVersion = all .TestVersion
287291
288292 if len (additionalProperties ) > 0 {
0 commit comments