Skip to content

Commit f6dd6a7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 42664a7 of spec repo
1 parent db7630a commit f6dd6a7

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50452,6 +50452,12 @@ components:
5045250452
icon:
5045350453
description: URL of the user's icon.
5045450454
type: string
50455+
last_login_time:
50456+
description: Last time the user logged in.
50457+
format: date-time
50458+
nullable: true
50459+
readOnly: true
50460+
type: string
5045550461
mfa_enabled:
5045650462
description: If user has MFA enabled.
5045750463
readOnly: true

api/datadogV2/model_user_attributes.go

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.
202243
func (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

Comments
 (0)