From 6139b3125a57880b58c6c176b4a4d1a8bff8bfcc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 10 Oct 2025 17:45:17 +0000 Subject: [PATCH] Regenerate client from commit 173230f of spec repo --- .generator/schemas/v2/openapi.yaml | 6 ++++ api/datadogV2/model_user_attributes.go | 48 +++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 82aecd68139..f4a07db5e43 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50704,6 +50704,12 @@ components: icon: description: URL of the user's icon. type: string + last_login_time: + description: The last time the user logged in. + format: date-time + nullable: true + readOnly: true + type: string mfa_enabled: description: If user has MFA enabled. readOnly: true diff --git a/api/datadogV2/model_user_attributes.go b/api/datadogV2/model_user_attributes.go index 3f0238260e8..bf1de98afac 100644 --- a/api/datadogV2/model_user_attributes.go +++ b/api/datadogV2/model_user_attributes.go @@ -22,6 +22,8 @@ type UserAttributes struct { Handle *string `json:"handle,omitempty"` // URL of the user's icon. Icon *string `json:"icon,omitempty"` + // The last time the user logged in. + LastLoginTime datadog.NullableTime `json:"last_login_time,omitempty"` // If user has MFA enabled. MfaEnabled *bool `json:"mfa_enabled,omitempty"` // Time that the user was last modified. @@ -198,6 +200,45 @@ func (o *UserAttributes) SetIcon(v string) { o.Icon = &v } +// GetLastLoginTime returns the LastLoginTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAttributes) GetLastLoginTime() time.Time { + if o == nil || o.LastLoginTime.Get() == nil { + var ret time.Time + return ret + } + return *o.LastLoginTime.Get() +} + +// GetLastLoginTimeOk returns a tuple with the LastLoginTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. +func (o *UserAttributes) GetLastLoginTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastLoginTime.Get(), o.LastLoginTime.IsSet() +} + +// HasLastLoginTime returns a boolean if a field has been set. +func (o *UserAttributes) HasLastLoginTime() bool { + return o != nil && o.LastLoginTime.IsSet() +} + +// SetLastLoginTime gets a reference to the given datadog.NullableTime and assigns it to the LastLoginTime field. +func (o *UserAttributes) SetLastLoginTime(v time.Time) { + o.LastLoginTime.Set(&v) +} + +// SetLastLoginTimeNil sets the value for LastLoginTime to be an explicit nil. +func (o *UserAttributes) SetLastLoginTimeNil() { + o.LastLoginTime.Set(nil) +} + +// UnsetLastLoginTime ensures that no value is present for LastLoginTime, not even an explicit nil. +func (o *UserAttributes) UnsetLastLoginTime() { + o.LastLoginTime.Unset() +} + // GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise. func (o *UserAttributes) GetMfaEnabled() bool { if o == nil || o.MfaEnabled == nil { @@ -441,6 +482,9 @@ func (o UserAttributes) MarshalJSON() ([]byte, error) { if o.Icon != nil { toSerialize["icon"] = o.Icon } + if o.LastLoginTime.IsSet() { + toSerialize["last_login_time"] = o.LastLoginTime.Get() + } if o.MfaEnabled != nil { toSerialize["mfa_enabled"] = o.MfaEnabled } @@ -481,6 +525,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { Email *string `json:"email,omitempty"` Handle *string `json:"handle,omitempty"` Icon *string `json:"icon,omitempty"` + LastLoginTime datadog.NullableTime `json:"last_login_time,omitempty"` MfaEnabled *bool `json:"mfa_enabled,omitempty"` ModifiedAt *time.Time `json:"modified_at,omitempty"` Name datadog.NullableString `json:"name,omitempty"` @@ -494,7 +539,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "disabled", "email", "handle", "icon", "mfa_enabled", "modified_at", "name", "service_account", "status", "title", "verified"}) + datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "disabled", "email", "handle", "icon", "last_login_time", "mfa_enabled", "modified_at", "name", "service_account", "status", "title", "verified"}) } else { return err } @@ -503,6 +548,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { o.Email = all.Email o.Handle = all.Handle o.Icon = all.Icon + o.LastLoginTime = all.LastLoginTime o.MfaEnabled = all.MfaEnabled o.ModifiedAt = all.ModifiedAt o.Name = all.Name