@@ -17,7 +17,7 @@ type SyntheticsMobileTest struct {
17
17
// Array with the different device IDs used to run the test.
18
18
DeviceIds []string `json:"device_ids,omitempty"`
19
19
// Notification message associated with the test.
20
- Message * string `json:"message,omitempty "`
20
+ Message string `json:"message"`
21
21
// The associated monitor ID.
22
22
MonitorId * int64 `json:"monitor_id,omitempty"`
23
23
// Name of the test.
@@ -44,9 +44,10 @@ type SyntheticsMobileTest struct {
44
44
// This constructor will assign default values to properties that have it defined,
45
45
// and makes sure properties required by API are set, but the set of arguments
46
46
// will change when the set of required properties is changed.
47
- func NewSyntheticsMobileTest (config SyntheticsMobileTestConfig , name string , options SyntheticsMobileTestOptions , typeVar SyntheticsMobileTestType ) * SyntheticsMobileTest {
47
+ func NewSyntheticsMobileTest (config SyntheticsMobileTestConfig , message string , name string , options SyntheticsMobileTestOptions , typeVar SyntheticsMobileTestType ) * SyntheticsMobileTest {
48
48
this := SyntheticsMobileTest {}
49
49
this .Config = config
50
+ this .Message = message
50
51
this .Name = name
51
52
this .Options = options
52
53
this .Type = typeVar
@@ -114,32 +115,27 @@ func (o *SyntheticsMobileTest) SetDeviceIds(v []string) {
114
115
o .DeviceIds = v
115
116
}
116
117
117
- // GetMessage returns the Message field value if set, zero value otherwise .
118
+ // GetMessage returns the Message field value.
118
119
func (o * SyntheticsMobileTest ) GetMessage () string {
119
- if o == nil || o . Message == nil {
120
+ if o == nil {
120
121
var ret string
121
122
return ret
122
123
}
123
- return * o .Message
124
+ return o .Message
124
125
}
125
126
126
- // GetMessageOk returns a tuple with the Message field value if set, nil otherwise
127
+ // GetMessageOk returns a tuple with the Message field value
127
128
// and a boolean to check if the value has been set.
128
129
func (o * SyntheticsMobileTest ) GetMessageOk () (* string , bool ) {
129
- if o == nil || o . Message == nil {
130
+ if o == nil {
130
131
return nil , false
131
132
}
132
- return o .Message , true
133
- }
134
-
135
- // HasMessage returns a boolean if a field has been set.
136
- func (o * SyntheticsMobileTest ) HasMessage () bool {
137
- return o != nil && o .Message != nil
133
+ return & o .Message , true
138
134
}
139
135
140
- // SetMessage gets a reference to the given string and assigns it to the Message field.
136
+ // SetMessage sets field value .
141
137
func (o * SyntheticsMobileTest ) SetMessage (v string ) {
142
- o .Message = & v
138
+ o .Message = v
143
139
}
144
140
145
141
// GetMonitorId returns the MonitorId field value if set, zero value otherwise.
@@ -361,9 +357,7 @@ func (o SyntheticsMobileTest) MarshalJSON() ([]byte, error) {
361
357
if o .DeviceIds != nil {
362
358
toSerialize ["device_ids" ] = o .DeviceIds
363
359
}
364
- if o .Message != nil {
365
- toSerialize ["message" ] = o .Message
366
- }
360
+ toSerialize ["message" ] = o .Message
367
361
if o .MonitorId != nil {
368
362
toSerialize ["monitor_id" ] = o .MonitorId
369
363
}
@@ -394,7 +388,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
394
388
all := struct {
395
389
Config * SyntheticsMobileTestConfig `json:"config"`
396
390
DeviceIds []string `json:"device_ids,omitempty"`
397
- Message * string `json:"message,omitempty "`
391
+ Message * string `json:"message"`
398
392
MonitorId * int64 `json:"monitor_id,omitempty"`
399
393
Name * string `json:"name"`
400
394
Options * SyntheticsMobileTestOptions `json:"options"`
@@ -410,6 +404,9 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
410
404
if all .Config == nil {
411
405
return fmt .Errorf ("required field config missing" )
412
406
}
407
+ if all .Message == nil {
408
+ return fmt .Errorf ("required field message missing" )
409
+ }
413
410
if all .Name == nil {
414
411
return fmt .Errorf ("required field name missing" )
415
412
}
@@ -432,7 +429,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
432
429
}
433
430
o .Config = * all .Config
434
431
o .DeviceIds = all .DeviceIds
435
- o .Message = all .Message
432
+ o .Message = * all .Message
436
433
o .MonitorId = all .MonitorId
437
434
o .Name = * all .Name
438
435
if all .Options .UnparsedObject != nil && o .UnparsedObject == nil {
0 commit comments