Skip to content

Commit ed8912b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fe40677 of spec repo
1 parent 3a0ec26 commit ed8912b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
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

src/datadogV2/model/model_user_attributes.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ pub struct UserAttributes {
2626
/// URL of the user's icon.
2727
#[serde(rename = "icon")]
2828
pub icon: Option<String>,
29+
/// Last time the user logged in.
30+
#[serde(
31+
rename = "last_login_time",
32+
default,
33+
with = "::serde_with::rust::double_option"
34+
)]
35+
pub last_login_time: Option<Option<chrono::DateTime<chrono::Utc>>>,
2936
/// If user has MFA enabled.
3037
#[serde(rename = "mfa_enabled")]
3138
pub mfa_enabled: Option<bool>,
@@ -62,6 +69,7 @@ impl UserAttributes {
6269
email: None,
6370
handle: None,
6471
icon: None,
72+
last_login_time: None,
6573
mfa_enabled: None,
6674
modified_at: None,
6775
name: None,
@@ -99,6 +107,11 @@ impl UserAttributes {
99107
self
100108
}
101109

110+
pub fn last_login_time(mut self, value: Option<chrono::DateTime<chrono::Utc>>) -> Self {
111+
self.last_login_time = Some(value);
112+
self
113+
}
114+
102115
pub fn mfa_enabled(mut self, value: bool) -> Self {
103116
self.mfa_enabled = Some(value);
104117
self
@@ -171,6 +184,7 @@ impl<'de> Deserialize<'de> for UserAttributes {
171184
let mut email: Option<String> = None;
172185
let mut handle: Option<String> = None;
173186
let mut icon: Option<String> = None;
187+
let mut last_login_time: Option<Option<chrono::DateTime<chrono::Utc>>> = None;
174188
let mut mfa_enabled: Option<bool> = None;
175189
let mut modified_at: Option<chrono::DateTime<chrono::Utc>> = None;
176190
let mut name: Option<Option<String>> = None;
@@ -216,6 +230,10 @@ impl<'de> Deserialize<'de> for UserAttributes {
216230
}
217231
icon = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
218232
}
233+
"last_login_time" => {
234+
last_login_time =
235+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
236+
}
219237
"mfa_enabled" => {
220238
if v.is_null() {
221239
continue;
@@ -269,6 +287,7 @@ impl<'de> Deserialize<'de> for UserAttributes {
269287
email,
270288
handle,
271289
icon,
290+
last_login_time,
272291
mfa_enabled,
273292
modified_at,
274293
name,

0 commit comments

Comments
 (0)