@@ -18,6 +18,10 @@ type RoleAttributes struct {
1818 ModifiedAt * time.Time `json:"modified_at,omitempty"`
1919 // The name of the role. The name is neither unique nor a stable identifier of the role.
2020 Name * string `json:"name,omitempty"`
21+ // The managed role from which this role automatically inherits new permissions.
22+ // Specify one of the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role".
23+ // If empty or not specified, the role does not automatically inherit permissions from any managed role.
24+ ReceivesPermissionsFrom []string `json:"receives_permissions_from,omitempty"`
2125 // Number of users with that role.
2226 UserCount * int64 `json:"user_count,omitempty"`
2327 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -126,6 +130,34 @@ func (o *RoleAttributes) SetName(v string) {
126130 o .Name = & v
127131}
128132
133+ // GetReceivesPermissionsFrom returns the ReceivesPermissionsFrom field value if set, zero value otherwise.
134+ func (o * RoleAttributes ) GetReceivesPermissionsFrom () []string {
135+ if o == nil || o .ReceivesPermissionsFrom == nil {
136+ var ret []string
137+ return ret
138+ }
139+ return o .ReceivesPermissionsFrom
140+ }
141+
142+ // GetReceivesPermissionsFromOk returns a tuple with the ReceivesPermissionsFrom field value if set, nil otherwise
143+ // and a boolean to check if the value has been set.
144+ func (o * RoleAttributes ) GetReceivesPermissionsFromOk () (* []string , bool ) {
145+ if o == nil || o .ReceivesPermissionsFrom == nil {
146+ return nil , false
147+ }
148+ return & o .ReceivesPermissionsFrom , true
149+ }
150+
151+ // HasReceivesPermissionsFrom returns a boolean if a field has been set.
152+ func (o * RoleAttributes ) HasReceivesPermissionsFrom () bool {
153+ return o != nil && o .ReceivesPermissionsFrom != nil
154+ }
155+
156+ // SetReceivesPermissionsFrom gets a reference to the given []string and assigns it to the ReceivesPermissionsFrom field.
157+ func (o * RoleAttributes ) SetReceivesPermissionsFrom (v []string ) {
158+ o .ReceivesPermissionsFrom = v
159+ }
160+
129161// GetUserCount returns the UserCount field value if set, zero value otherwise.
130162func (o * RoleAttributes ) GetUserCount () int64 {
131163 if o == nil || o .UserCount == nil {
@@ -177,6 +209,9 @@ func (o RoleAttributes) MarshalJSON() ([]byte, error) {
177209 if o .Name != nil {
178210 toSerialize ["name" ] = o .Name
179211 }
212+ if o .ReceivesPermissionsFrom != nil {
213+ toSerialize ["receives_permissions_from" ] = o .ReceivesPermissionsFrom
214+ }
180215 if o .UserCount != nil {
181216 toSerialize ["user_count" ] = o .UserCount
182217 }
@@ -190,23 +225,25 @@ func (o RoleAttributes) MarshalJSON() ([]byte, error) {
190225// UnmarshalJSON deserializes the given payload.
191226func (o * RoleAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
192227 all := struct {
193- CreatedAt * time.Time `json:"created_at,omitempty"`
194- ModifiedAt * time.Time `json:"modified_at,omitempty"`
195- Name * string `json:"name,omitempty"`
196- UserCount * int64 `json:"user_count,omitempty"`
228+ CreatedAt * time.Time `json:"created_at,omitempty"`
229+ ModifiedAt * time.Time `json:"modified_at,omitempty"`
230+ Name * string `json:"name,omitempty"`
231+ ReceivesPermissionsFrom []string `json:"receives_permissions_from,omitempty"`
232+ UserCount * int64 `json:"user_count,omitempty"`
197233 }{}
198234 if err = datadog .Unmarshal (bytes , & all ); err != nil {
199235 return datadog .Unmarshal (bytes , & o .UnparsedObject )
200236 }
201237 additionalProperties := make (map [string ]interface {})
202238 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
203- datadog .DeleteKeys (additionalProperties , & []string {"created_at" , "modified_at" , "name" , "user_count" })
239+ datadog .DeleteKeys (additionalProperties , & []string {"created_at" , "modified_at" , "name" , "receives_permissions_from" , " user_count" })
204240 } else {
205241 return err
206242 }
207243 o .CreatedAt = all .CreatedAt
208244 o .ModifiedAt = all .ModifiedAt
209245 o .Name = all .Name
246+ o .ReceivesPermissionsFrom = all .ReceivesPermissionsFrom
210247 o .UserCount = all .UserCount
211248
212249 if len (additionalProperties ) > 0 {
0 commit comments