Skip to content

Synthetics mobile test message field is now required #3182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-26 17:56:23.043504",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-30 10:29:39.541125",
"spec_repo_commit": "be63084a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-26 17:56:23.062756",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-30 10:29:39.589743",
"spec_repo_commit": "be63084a"
}
}
}
1 change: 1 addition & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16173,6 +16173,7 @@ components:
- name
- options
- type
- message
type: object
SyntheticsMobileTestConfig:
description: Configuration object for a Synthetic mobile test.
Expand Down
37 changes: 17 additions & 20 deletions api/datadogV1/model_synthetics_mobile_test_.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type SyntheticsMobileTest struct {
// Array with the different device IDs used to run the test.
DeviceIds []string `json:"device_ids,omitempty"`
// Notification message associated with the test.
Message *string `json:"message,omitempty"`
Message string `json:"message"`
// The associated monitor ID.
MonitorId *int64 `json:"monitor_id,omitempty"`
// Name of the test.
Expand All @@ -44,9 +44,10 @@ type SyntheticsMobileTest struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed.
func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest {
func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, message string, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest {
this := SyntheticsMobileTest{}
this.Config = config
this.Message = message
this.Name = name
this.Options = options
this.Type = typeVar
Expand Down Expand Up @@ -114,32 +115,27 @@ func (o *SyntheticsMobileTest) SetDeviceIds(v []string) {
o.DeviceIds = v
}

// GetMessage returns the Message field value if set, zero value otherwise.
// GetMessage returns the Message field value.
func (o *SyntheticsMobileTest) GetMessage() string {
if o == nil || o.Message == nil {
if o == nil {
var ret string
return ret
}
return *o.Message
return o.Message
}

// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *SyntheticsMobileTest) GetMessageOk() (*string, bool) {
if o == nil || o.Message == nil {
if o == nil {
return nil, false
}
return o.Message, true
}

// HasMessage returns a boolean if a field has been set.
func (o *SyntheticsMobileTest) HasMessage() bool {
return o != nil && o.Message != nil
return &o.Message, true
}

// SetMessage gets a reference to the given string and assigns it to the Message field.
// SetMessage sets field value.
func (o *SyntheticsMobileTest) SetMessage(v string) {
o.Message = &v
o.Message = v
}

// GetMonitorId returns the MonitorId field value if set, zero value otherwise.
Expand Down Expand Up @@ -361,9 +357,7 @@ func (o SyntheticsMobileTest) MarshalJSON() ([]byte, error) {
if o.DeviceIds != nil {
toSerialize["device_ids"] = o.DeviceIds
}
if o.Message != nil {
toSerialize["message"] = o.Message
}
toSerialize["message"] = o.Message
if o.MonitorId != nil {
toSerialize["monitor_id"] = o.MonitorId
}
Expand Down Expand Up @@ -394,7 +388,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Config *SyntheticsMobileTestConfig `json:"config"`
DeviceIds []string `json:"device_ids,omitempty"`
Message *string `json:"message,omitempty"`
Message *string `json:"message"`
MonitorId *int64 `json:"monitor_id,omitempty"`
Name *string `json:"name"`
Options *SyntheticsMobileTestOptions `json:"options"`
Expand All @@ -410,6 +404,9 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
if all.Config == nil {
return fmt.Errorf("required field config missing")
}
if all.Message == nil {
return fmt.Errorf("required field message missing")
}
if all.Name == nil {
return fmt.Errorf("required field name missing")
}
Expand All @@ -432,7 +429,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
}
o.Config = *all.Config
o.DeviceIds = all.DeviceIds
o.Message = all.Message
o.Message = *all.Message
o.MonitorId = all.MonitorId
o.Name = *all.Name
if all.Options.UnparsedObject != nil && o.UnparsedObject == nil {
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/CreateSyntheticsMobileTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
Config: datadogV1.SyntheticsMobileTestConfig{
Variables: []datadogV1.SyntheticsConfigVariable{},
},
Message: datadog.PtrString(""),
Message: "",
Options: datadogV1.SyntheticsMobileTestOptions{
DeviceIds: []string{
"synthetics:mobile:device:iphone_15_ios_17",
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/UpdateMobileTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
Config: datadogV1.SyntheticsMobileTestConfig{
Variables: []datadogV1.SyntheticsConfigVariable{},
},
Message: datadog.PtrString(""),
Message: "",
Options: datadogV1.SyntheticsMobileTestOptions{
DeviceIds: []string{
"synthetics:mobile:device:iphone_15_ios_17",
Expand Down