@@ -10,16 +10,16 @@ import (
1010
1111// IncidentResponseIncludedItem - An object related to an incident that is included in the response.
1212type IncidentResponseIncludedItem struct {
13- User * User
13+ IncidentUserData * IncidentUserData
1414 IncidentAttachmentData * IncidentAttachmentData
1515
1616 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1717 UnparsedObject interface {}
1818}
1919
20- // UserAsIncidentResponseIncludedItem is a convenience function that returns User wrapped in IncidentResponseIncludedItem.
21- func UserAsIncidentResponseIncludedItem (v * User ) IncidentResponseIncludedItem {
22- return IncidentResponseIncludedItem {User : v }
20+ // IncidentUserDataAsIncidentResponseIncludedItem is a convenience function that returns IncidentUserData wrapped in IncidentResponseIncludedItem.
21+ func IncidentUserDataAsIncidentResponseIncludedItem (v * IncidentUserData ) IncidentResponseIncludedItem {
22+ return IncidentResponseIncludedItem {IncidentUserData : v }
2323}
2424
2525// IncidentAttachmentDataAsIncidentResponseIncludedItem is a convenience function that returns IncidentAttachmentData wrapped in IncidentResponseIncludedItem.
@@ -31,21 +31,21 @@ func IncidentAttachmentDataAsIncidentResponseIncludedItem(v *IncidentAttachmentD
3131func (obj * IncidentResponseIncludedItem ) UnmarshalJSON (data []byte ) error {
3232 var err error
3333 match := 0
34- // try to unmarshal data into User
35- err = datadog .Unmarshal (data , & obj .User )
34+ // try to unmarshal data into IncidentUserData
35+ err = datadog .Unmarshal (data , & obj .IncidentUserData )
3636 if err == nil {
37- if obj .User != nil && obj .User .UnparsedObject == nil {
38- jsonUser , _ := datadog .Marshal (obj .User )
39- if string (jsonUser ) == "{}" && string (data ) != "{}" { // empty struct
40- obj .User = nil
37+ if obj .IncidentUserData != nil && obj .IncidentUserData .UnparsedObject == nil {
38+ jsonIncidentUserData , _ := datadog .Marshal (obj .IncidentUserData )
39+ if string (jsonIncidentUserData ) == "{}" && string (data ) != "{}" { // empty struct
40+ obj .IncidentUserData = nil
4141 } else {
4242 match ++
4343 }
4444 } else {
45- obj .User = nil
45+ obj .IncidentUserData = nil
4646 }
4747 } else {
48- obj .User = nil
48+ obj .IncidentUserData = nil
4949 }
5050
5151 // try to unmarshal data into IncidentAttachmentData
@@ -67,7 +67,7 @@ func (obj *IncidentResponseIncludedItem) UnmarshalJSON(data []byte) error {
6767
6868 if match != 1 { // more than 1 match
6969 // reset to nil
70- obj .User = nil
70+ obj .IncidentUserData = nil
7171 obj .IncidentAttachmentData = nil
7272 return datadog .Unmarshal (data , & obj .UnparsedObject )
7373 }
@@ -76,8 +76,8 @@ func (obj *IncidentResponseIncludedItem) UnmarshalJSON(data []byte) error {
7676
7777// MarshalJSON turns data from the first non-nil pointers in the struct to JSON.
7878func (obj IncidentResponseIncludedItem ) MarshalJSON () ([]byte , error ) {
79- if obj .User != nil {
80- return datadog .Marshal (& obj .User )
79+ if obj .IncidentUserData != nil {
80+ return datadog .Marshal (& obj .IncidentUserData )
8181 }
8282
8383 if obj .IncidentAttachmentData != nil {
@@ -92,8 +92,8 @@ func (obj IncidentResponseIncludedItem) MarshalJSON() ([]byte, error) {
9292
9393// GetActualInstance returns the actual instance.
9494func (obj * IncidentResponseIncludedItem ) GetActualInstance () interface {} {
95- if obj .User != nil {
96- return obj .User
95+ if obj .IncidentUserData != nil {
96+ return obj .IncidentUserData
9797 }
9898
9999 if obj .IncidentAttachmentData != nil {
0 commit comments