@@ -11,12 +11,14 @@ import (
1111// SyntheticsAssertion - Object describing the assertions type, their associated operator,
1212// which property they apply, and upon which target.
1313type SyntheticsAssertion struct {
14- SyntheticsAssertionTarget * SyntheticsAssertionTarget
15- SyntheticsAssertionBodyHashTarget * SyntheticsAssertionBodyHashTarget
16- SyntheticsAssertionJSONPathTarget * SyntheticsAssertionJSONPathTarget
17- SyntheticsAssertionJSONSchemaTarget * SyntheticsAssertionJSONSchemaTarget
18- SyntheticsAssertionXPathTarget * SyntheticsAssertionXPathTarget
19- SyntheticsAssertionJavascript * SyntheticsAssertionJavascript
14+ SyntheticsAssertionTarget * SyntheticsAssertionTarget
15+ SyntheticsAssertionBodyHashTarget * SyntheticsAssertionBodyHashTarget
16+ SyntheticsAssertionJSONPathTarget * SyntheticsAssertionJSONPathTarget
17+ SyntheticsAssertionJSONSchemaTarget * SyntheticsAssertionJSONSchemaTarget
18+ SyntheticsAssertionXPathTarget * SyntheticsAssertionXPathTarget
19+ SyntheticsAssertionJavascript * SyntheticsAssertionJavascript
20+ SyntheticsAssertionMCPServerCapabilitiesTarget * SyntheticsAssertionMCPServerCapabilitiesTarget
21+ SyntheticsAssertionMCPRespectsSpecification * SyntheticsAssertionMCPRespectsSpecification
2022
2123 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2224 UnparsedObject interface {}
@@ -52,6 +54,16 @@ func SyntheticsAssertionJavascriptAsSyntheticsAssertion(v *SyntheticsAssertionJa
5254 return SyntheticsAssertion {SyntheticsAssertionJavascript : v }
5355}
5456
57+ // SyntheticsAssertionMCPServerCapabilitiesTargetAsSyntheticsAssertion is a convenience function that returns SyntheticsAssertionMCPServerCapabilitiesTarget wrapped in SyntheticsAssertion.
58+ func SyntheticsAssertionMCPServerCapabilitiesTargetAsSyntheticsAssertion (v * SyntheticsAssertionMCPServerCapabilitiesTarget ) SyntheticsAssertion {
59+ return SyntheticsAssertion {SyntheticsAssertionMCPServerCapabilitiesTarget : v }
60+ }
61+
62+ // SyntheticsAssertionMCPRespectsSpecificationAsSyntheticsAssertion is a convenience function that returns SyntheticsAssertionMCPRespectsSpecification wrapped in SyntheticsAssertion.
63+ func SyntheticsAssertionMCPRespectsSpecificationAsSyntheticsAssertion (v * SyntheticsAssertionMCPRespectsSpecification ) SyntheticsAssertion {
64+ return SyntheticsAssertion {SyntheticsAssertionMCPRespectsSpecification : v }
65+ }
66+
5567// UnmarshalJSON turns data into one of the pointers in the struct.
5668func (obj * SyntheticsAssertion ) UnmarshalJSON (data []byte ) error {
5769 var err error
@@ -158,6 +170,40 @@ func (obj *SyntheticsAssertion) UnmarshalJSON(data []byte) error {
158170 obj .SyntheticsAssertionJavascript = nil
159171 }
160172
173+ // try to unmarshal data into SyntheticsAssertionMCPServerCapabilitiesTarget
174+ err = datadog .Unmarshal (data , & obj .SyntheticsAssertionMCPServerCapabilitiesTarget )
175+ if err == nil {
176+ if obj .SyntheticsAssertionMCPServerCapabilitiesTarget != nil && obj .SyntheticsAssertionMCPServerCapabilitiesTarget .UnparsedObject == nil {
177+ jsonSyntheticsAssertionMCPServerCapabilitiesTarget , _ := datadog .Marshal (obj .SyntheticsAssertionMCPServerCapabilitiesTarget )
178+ if string (jsonSyntheticsAssertionMCPServerCapabilitiesTarget ) == "{}" { // empty struct
179+ obj .SyntheticsAssertionMCPServerCapabilitiesTarget = nil
180+ } else {
181+ match ++
182+ }
183+ } else {
184+ obj .SyntheticsAssertionMCPServerCapabilitiesTarget = nil
185+ }
186+ } else {
187+ obj .SyntheticsAssertionMCPServerCapabilitiesTarget = nil
188+ }
189+
190+ // try to unmarshal data into SyntheticsAssertionMCPRespectsSpecification
191+ err = datadog .Unmarshal (data , & obj .SyntheticsAssertionMCPRespectsSpecification )
192+ if err == nil {
193+ if obj .SyntheticsAssertionMCPRespectsSpecification != nil && obj .SyntheticsAssertionMCPRespectsSpecification .UnparsedObject == nil {
194+ jsonSyntheticsAssertionMCPRespectsSpecification , _ := datadog .Marshal (obj .SyntheticsAssertionMCPRespectsSpecification )
195+ if string (jsonSyntheticsAssertionMCPRespectsSpecification ) == "{}" { // empty struct
196+ obj .SyntheticsAssertionMCPRespectsSpecification = nil
197+ } else {
198+ match ++
199+ }
200+ } else {
201+ obj .SyntheticsAssertionMCPRespectsSpecification = nil
202+ }
203+ } else {
204+ obj .SyntheticsAssertionMCPRespectsSpecification = nil
205+ }
206+
161207 if match != 1 { // more than 1 match
162208 // reset to nil
163209 obj .SyntheticsAssertionTarget = nil
@@ -166,6 +212,8 @@ func (obj *SyntheticsAssertion) UnmarshalJSON(data []byte) error {
166212 obj .SyntheticsAssertionJSONSchemaTarget = nil
167213 obj .SyntheticsAssertionXPathTarget = nil
168214 obj .SyntheticsAssertionJavascript = nil
215+ obj .SyntheticsAssertionMCPServerCapabilitiesTarget = nil
216+ obj .SyntheticsAssertionMCPRespectsSpecification = nil
169217 return datadog .Unmarshal (data , & obj .UnparsedObject )
170218 }
171219 return nil // exactly one match
@@ -197,6 +245,14 @@ func (obj SyntheticsAssertion) MarshalJSON() ([]byte, error) {
197245 return datadog .Marshal (& obj .SyntheticsAssertionJavascript )
198246 }
199247
248+ if obj .SyntheticsAssertionMCPServerCapabilitiesTarget != nil {
249+ return datadog .Marshal (& obj .SyntheticsAssertionMCPServerCapabilitiesTarget )
250+ }
251+
252+ if obj .SyntheticsAssertionMCPRespectsSpecification != nil {
253+ return datadog .Marshal (& obj .SyntheticsAssertionMCPRespectsSpecification )
254+ }
255+
200256 if obj .UnparsedObject != nil {
201257 return datadog .Marshal (obj .UnparsedObject )
202258 }
@@ -229,6 +285,14 @@ func (obj *SyntheticsAssertion) GetActualInstance() interface{} {
229285 return obj .SyntheticsAssertionJavascript
230286 }
231287
288+ if obj .SyntheticsAssertionMCPServerCapabilitiesTarget != nil {
289+ return obj .SyntheticsAssertionMCPServerCapabilitiesTarget
290+ }
291+
292+ if obj .SyntheticsAssertionMCPRespectsSpecification != nil {
293+ return obj .SyntheticsAssertionMCPRespectsSpecification
294+ }
295+
232296 // all schemas are nil
233297 return nil
234298}
0 commit comments