@@ -22,6 +22,8 @@ type UserAttributes struct {
2222 Handle * string `json:"handle,omitempty"`
2323 // URL of the user's icon.
2424 Icon * string `json:"icon,omitempty"`
25+ // Last time the user logged in.
26+ LastLoginTime datadog.NullableTime `json:"last_login_time,omitempty"`
2527 // If user has MFA enabled.
2628 MfaEnabled * bool `json:"mfa_enabled,omitempty"`
2729 // Time that the user was last modified.
@@ -198,6 +200,45 @@ func (o *UserAttributes) SetIcon(v string) {
198200 o .Icon = & v
199201}
200202
203+ // GetLastLoginTime returns the LastLoginTime field value if set, zero value otherwise (both if not set or set to explicit null).
204+ func (o * UserAttributes ) GetLastLoginTime () time.Time {
205+ if o == nil || o .LastLoginTime .Get () == nil {
206+ var ret time.Time
207+ return ret
208+ }
209+ return * o .LastLoginTime .Get ()
210+ }
211+
212+ // GetLastLoginTimeOk returns a tuple with the LastLoginTime field value if set, nil otherwise
213+ // and a boolean to check if the value has been set.
214+ // NOTE: If the value is an explicit nil, `nil, true` will be returned.
215+ func (o * UserAttributes ) GetLastLoginTimeOk () (* time.Time , bool ) {
216+ if o == nil {
217+ return nil , false
218+ }
219+ return o .LastLoginTime .Get (), o .LastLoginTime .IsSet ()
220+ }
221+
222+ // HasLastLoginTime returns a boolean if a field has been set.
223+ func (o * UserAttributes ) HasLastLoginTime () bool {
224+ return o != nil && o .LastLoginTime .IsSet ()
225+ }
226+
227+ // SetLastLoginTime gets a reference to the given datadog.NullableTime and assigns it to the LastLoginTime field.
228+ func (o * UserAttributes ) SetLastLoginTime (v time.Time ) {
229+ o .LastLoginTime .Set (& v )
230+ }
231+
232+ // SetLastLoginTimeNil sets the value for LastLoginTime to be an explicit nil.
233+ func (o * UserAttributes ) SetLastLoginTimeNil () {
234+ o .LastLoginTime .Set (nil )
235+ }
236+
237+ // UnsetLastLoginTime ensures that no value is present for LastLoginTime, not even an explicit nil.
238+ func (o * UserAttributes ) UnsetLastLoginTime () {
239+ o .LastLoginTime .Unset ()
240+ }
241+
201242// GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise.
202243func (o * UserAttributes ) GetMfaEnabled () bool {
203244 if o == nil || o .MfaEnabled == nil {
@@ -441,6 +482,9 @@ func (o UserAttributes) MarshalJSON() ([]byte, error) {
441482 if o .Icon != nil {
442483 toSerialize ["icon" ] = o .Icon
443484 }
485+ if o .LastLoginTime .IsSet () {
486+ toSerialize ["last_login_time" ] = o .LastLoginTime .Get ()
487+ }
444488 if o .MfaEnabled != nil {
445489 toSerialize ["mfa_enabled" ] = o .MfaEnabled
446490 }
@@ -481,6 +525,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) {
481525 Email * string `json:"email,omitempty"`
482526 Handle * string `json:"handle,omitempty"`
483527 Icon * string `json:"icon,omitempty"`
528+ LastLoginTime datadog.NullableTime `json:"last_login_time,omitempty"`
484529 MfaEnabled * bool `json:"mfa_enabled,omitempty"`
485530 ModifiedAt * time.Time `json:"modified_at,omitempty"`
486531 Name datadog.NullableString `json:"name,omitempty"`
@@ -494,7 +539,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) {
494539 }
495540 additionalProperties := make (map [string ]interface {})
496541 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
497- datadog .DeleteKeys (additionalProperties , & []string {"created_at" , "disabled" , "email" , "handle" , "icon" , "mfa_enabled" , "modified_at" , "name" , "service_account" , "status" , "title" , "verified" })
542+ datadog .DeleteKeys (additionalProperties , & []string {"created_at" , "disabled" , "email" , "handle" , "icon" , "last_login_time" , " mfa_enabled" , "modified_at" , "name" , "service_account" , "status" , "title" , "verified" })
498543 } else {
499544 return err
500545 }
@@ -503,6 +548,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) {
503548 o .Email = all .Email
504549 o .Handle = all .Handle
505550 o .Icon = all .Icon
551+ o .LastLoginTime = all .LastLoginTime
506552 o .MfaEnabled = all .MfaEnabled
507553 o .ModifiedAt = all .ModifiedAt
508554 o .Name = all .Name
0 commit comments